You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What we do right now is as part of assigning system we fall back to assigning linux2 if we do not recognize the system.
Most of our functions however, apply the same fallback strategy anew if they encounter none of the recognized strings, but now they dont check againsts sys.platform but our own system global.
To me it seems sensible to have only one point where a system (propably better named strategy) is determined and have all functions just act accordingly.
If a function ends up with going though all supported system string values without a hit, it should throw an error as it means that for whatever reason system has been assigned a value that we do not support.
A line of code is propably worth more then words:
elif system == 'darwin':
path = os.path.expanduser('/Library/Application Support')
if appname:
path = os.path.join(path, appname)
else:
# XDG default for $XDG_DATA_DIRS
# only first, if multipath is False](url)
should be:
elif system == 'darwin':
path = os.path.expanduser('/Library/Application Support')
if appname:
path = os.path.join(path, appname)
elif system== 'linux2':
# XDG default for $XDG_DATA_DIRS
# only first, if multipath is False](url)
else:
raise ValueError("Unrecognized system string.")
The text was updated successfully, but these errors were encountered:
What we do right now is as part of assigning
system
we fall back to assigninglinux2
if we do not recognize the system.Most of our functions however, apply the same fallback strategy anew if they encounter none of the recognized strings, but now they dont check againsts
sys.platform
but our ownsystem
global.To me it seems sensible to have only one point where a system (propably better named
strategy
) is determined and have all functions just act accordingly.If a function ends up with going though all supported
system
string values without a hit, it should throw an error as it means that for whatever reasonsystem
has been assigned a value that we do not support.A line of code is propably worth more then words:
should be:
The text was updated successfully, but these errors were encountered: