Add some explanation to is_portable(); fixes #729
This commit is contained in:
parent
2b4602068b
commit
b568546fb8
@ -349,6 +349,14 @@ def get_user_data_path(*args):
|
|||||||
|
|
||||||
|
|
||||||
def is_portable():
|
def is_portable():
|
||||||
|
"""Return True if openslides is run as portable version"""
|
||||||
|
|
||||||
|
# NOTE: sys.executable is the path of the *interpreter*
|
||||||
|
# the portable version embeds python so it *is* the interpreter.
|
||||||
|
# The wrappers generated by pip and co. will spawn
|
||||||
|
# the usual python(w).exe, so there is no danger of mistaking
|
||||||
|
# them for the portable even though they may also be called
|
||||||
|
# openslides.exe
|
||||||
exename = os.path.basename(sys.executable).lower()
|
exename = os.path.basename(sys.executable).lower()
|
||||||
return exename == "openslides.exe"
|
return exename == "openslides.exe"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user