mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-05 22:08:12 +08:00
fix usage of iter_entry_points
This commit is contained in:
+4
-4
@@ -216,10 +216,10 @@ if Conf.ERROR_REPORTER:
|
|||||||
# iterate through the configured error reporters,
|
# iterate through the configured error reporters,
|
||||||
# and instantiate an ErrorReporter using the provided config
|
# and instantiate an ErrorReporter using the provided config
|
||||||
for name, conf in error_conf.items():
|
for name, conf in error_conf.items():
|
||||||
Reporter = pkg_resources.iter_entry_points(
|
for entry in pkg_resources.iter_entry_points(
|
||||||
'djangoq.errorreporters', name).load()
|
'djangoq.errorreporters', name):
|
||||||
e = Reporter(**conf)
|
Reporter = entry.load()
|
||||||
reporters.append(e)
|
reporters.append(Reporter(**conf))
|
||||||
error_reporter = ErrorReporter(reporters)
|
error_reporter = ErrorReporter(reporters)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
error_reporter = None
|
error_reporter = None
|
||||||
|
|||||||
Reference in New Issue
Block a user