diff options
| author | 2023-10-03 18:31:58 -0400 | |
|---|---|---|
| committer | 2023-10-03 18:31:58 -0400 | |
| commit | b8758ecd073910ce3220b2e68399147b425c37b8 (patch) | |
| tree | d6aee20213508c8f425cbacb3d714367eca904c5 /gallery_dl/__main__.py | |
| parent | e2f67519f8c1750a71aab3dc56b8345fff21bac5 (diff) | |
New upstream version 1.26.0.upstream/1.26.0
Diffstat (limited to 'gallery_dl/__main__.py')
| -rw-r--r-- | gallery_dl/__main__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gallery_dl/__main__.py b/gallery_dl/__main__.py index 637d463..db3a34e 100644 --- a/gallery_dl/__main__.py +++ b/gallery_dl/__main__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright 2017-2019 Mike Fährmann +# Copyright 2017-2023 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -9,12 +9,12 @@ import sys -if __package__ is None and not hasattr(sys, "frozen"): +if not __package__ and not hasattr(sys, "frozen"): import os.path - path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - sys.path.insert(0, os.path.realpath(path)) + path = os.path.realpath(os.path.abspath(__file__)) + sys.path.insert(0, os.path.dirname(os.path.dirname(path))) import gallery_dl if __name__ == "__main__": - sys.exit(gallery_dl.main()) + raise SystemExit(gallery_dl.main()) |
