diff options
| author | 2021-03-13 16:26:37 -0500 | |
|---|---|---|
| committer | 2021-03-13 16:26:37 -0500 | |
| commit | da957b2f208e97f6676605a8e23d12b4085c1ce7 (patch) | |
| tree | 9caf3d31f464715398822e8e47f71c7682e297aa /gallery_dl/postprocessor/__init__.py | |
| parent | d968c34172dd5c2eb307b14aa7e2fac7f4707214 (diff) | |
| parent | 3201d77a148367d739862b4f07868a76eaeb7cb1 (diff) | |
Update upstream source from tag 'upstream/1.17.0'
Update to upstream version '1.17.0'
with Debian dir a31fb4b099fcdaf845e80d20dda8fb0f31bf26c1
Diffstat (limited to 'gallery_dl/postprocessor/__init__.py')
| -rw-r--r-- | gallery_dl/postprocessor/__init__.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gallery_dl/postprocessor/__init__.py b/gallery_dl/postprocessor/__init__.py index faa4d6c..ee490e7 100644 --- a/gallery_dl/postprocessor/__init__.py +++ b/gallery_dl/postprocessor/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2018-2020 Mike Fährmann +# Copyright 2018-2021 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 @@ -8,8 +8,6 @@ """Post-processing modules""" -import importlib - modules = [ "classify", "compare", @@ -28,16 +26,16 @@ def find(name): except KeyError: pass - klass = None + cls = None if name in modules: # prevent unwanted imports try: - module = importlib.import_module("." + name, __package__) + module = __import__(name, globals(), None, (), 1) except ImportError: pass else: - klass = module.__postprocessor__ - _cache[name] = klass - return klass + cls = module.__postprocessor__ + _cache[name] = cls + return cls # -------------------------------------------------------------------- |
