mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 18:53:21 +01:00
move executable check into util.py
This commit is contained in:
parent
de2f35d068
commit
26d06e0bb2
@ -131,7 +131,7 @@ def main():
|
||||
import requests
|
||||
|
||||
extra = ""
|
||||
if getattr(sys, "frozen", False):
|
||||
if util.EXECUTABLE:
|
||||
extra = " - Executable"
|
||||
else:
|
||||
git_head = util.git_head()
|
||||
|
@ -38,7 +38,7 @@ else:
|
||||
]
|
||||
|
||||
|
||||
if getattr(sys, "frozen", False):
|
||||
if util.EXECUTABLE:
|
||||
# look for config file in PyInstaller executable directory (#682)
|
||||
_default_configs.append(os.path.join(
|
||||
os.path.dirname(sys.executable),
|
||||
|
@ -78,7 +78,7 @@ class Job():
|
||||
if version_info:
|
||||
self.kwdict[version_info] = {
|
||||
"version" : version.__version__,
|
||||
"is_executable" : getattr(sys, "frozen", False),
|
||||
"is_executable" : util.EXECUTABLE,
|
||||
"current_git_head": util.git_head()
|
||||
}
|
||||
|
||||
|
@ -603,6 +603,7 @@ SECOND = datetime.timedelta(0, 1)
|
||||
WINDOWS = (os.name == "nt")
|
||||
SENTINEL = object()
|
||||
USERAGENT = "gallery-dl/" + version.__version__
|
||||
EXECUTABLE = getattr(sys, "frozen", False)
|
||||
SPECIAL_EXTRACTORS = {"oauth", "recursive", "test"}
|
||||
GLOBALS = {
|
||||
"contains" : contains,
|
||||
|
Loading…
Reference in New Issue
Block a user