Skip to content

Commit

Permalink
Updated type checking for 'additional_devices'. Update comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
janeliu-slac committed Jan 22, 2025
1 parent 3f07404 commit c8b97d1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hutch_python/load_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from copy import copy
from pathlib import Path
from socket import gethostname
from typing import List, Dict

from . import mpl_config # noqa: F401

Expand Down Expand Up @@ -317,11 +316,11 @@ def load_conf(conf, hutch_dir=None, args=None):
# This is list of dictionaries with happi search terms and values.
# Additional devices are loaded based on these search terms.
additional_devices = conf['additional_devices']
if not isinstance(additional_devices, List[Dict]):
if not isinstance(additional_devices, list):
logger.error(
'Invalid additional_devices conf, must be a list of dictionaries.')
except KeyError:
additional_devices = {}
additional_devices = []
logger.info(
'Additional_devices have not been set in conf. No additional devices will be loaded')

Expand Down

0 comments on commit c8b97d1

Please sign in to comment.