1
0
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:
Mike Fährmann 2023-02-28 23:10:23 +01:00
parent de2f35d068
commit 26d06e0bb2
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
4 changed files with 4 additions and 3 deletions

View File

@ -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()

View File

@ -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),

View File

@ -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()
}

View File

@ -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,