diff options
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()) |
