diff options
| author | 2022-11-22 04:28:38 -0500 | |
|---|---|---|
| committer | 2022-11-22 04:28:38 -0500 | |
| commit | 7af5cc29d1c02d20a6890b7b7ba78ab41532a763 (patch) | |
| tree | 4f0366e5653074c7eb31ac7ca59a1ee55f2d736e /gallery_dl/__init__.py | |
| parent | e59d46ecda74190381b1d2725b0bd9df5c0be8d8 (diff) | |
New upstream version 1.24.0.upstream/1.24.0
Diffstat (limited to 'gallery_dl/__init__.py')
| -rw-r--r-- | gallery_dl/__init__.py | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/gallery_dl/__init__.py b/gallery_dl/__init__.py index b64fa2f..3701d6f 100644 --- a/gallery_dl/__init__.py +++ b/gallery_dl/__init__.py @@ -118,25 +118,15 @@ def main(): config.set(("output",), "mode", "null") elif args.loglevel <= logging.DEBUG: import platform - import subprocess - import os.path import requests extra = "" if getattr(sys, "frozen", False): extra = " - Executable" else: - try: - out, err = subprocess.Popen( - ("git", "rev-parse", "--short", "HEAD"), - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - cwd=os.path.dirname(os.path.abspath(__file__)), - ).communicate() - if out and not err: - extra = " - Git HEAD: " + out.decode().rstrip() - except (OSError, subprocess.SubprocessError): - pass + git_head = util.git_head() + if git_head: + extra = " - Git HEAD: " + git_head log.debug("Version %s%s", __version__, extra) log.debug("Python %s - %s", @@ -148,6 +138,8 @@ def main(): except AttributeError: pass + log.debug("Configuration Files %s", config._files) + if args.list_modules: extractor.modules.append("") sys.stdout.write("\n".join(extractor.modules)) @@ -201,7 +193,8 @@ def main(): if sys.stdin: urls += util.parse_inputfile(sys.stdin, log) else: - log.warning("input file: stdin is not readable") + log.warning( + "input file: stdin is not readable") else: with open(inputfile, encoding="utf-8") as file: urls += util.parse_inputfile(file, log) @@ -235,7 +228,7 @@ def main(): except exception.TerminateExtraction: pass except exception.NoExtractorError: - log.error("No suitable extractor found for '%s'", url) + log.error("Unsupported URL '%s'", url) retval |= 64 return retval |
