Skip to content

Fix bug on Python3.6 #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 10, 2021
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