Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion labscript_profile/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ def add_userlib_and_pythonlib():
time the interpreter starts up"""
labconfig = default_labconfig_path()
if labconfig is not None and labconfig.exists():
config = ConfigParser(defaults={'labscript_suite': LABSCRIPT_SUITE_PROFILE})
# str() below is for py36 compat, where ConfigParser can't deal with Path objs
config = ConfigParser(
defaults={'labscript_suite': str(LABSCRIPT_SUITE_PROFILE)}
)
config.read(labconfig)
for option in ['userlib', 'pythonlib']:
try:
Expand Down
3 changes: 2 additions & 1 deletion labscript_utils/labconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def __init__(
required_params = {}
if defaults is None:
defaults = {}
defaults['labscript_suite'] = LABSCRIPT_SUITE_PROFILE
# str() below is for py36 compat, where ConfigParser can't deal with Path objs
defaults['labscript_suite'] = str(LABSCRIPT_SUITE_PROFILE)
if isinstance(config_path, list):
self.config_path = config_path[0]
else:
Expand Down