diff --git a/colab/proxy/management/commands/import_proxy_data.py b/colab/proxy/management/commands/import_proxy_data.py index 1e7a825..327e932 100644 --- a/colab/proxy/management/commands/import_proxy_data.py +++ b/colab/proxy/management/commands/import_proxy_data.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import importlib +import inspect from django.core.management.base import BaseCommand from django.conf import settings @@ -20,7 +21,10 @@ class Command(BaseCommand): for module_item_name in dir(module): module_item = getattr(module, module_item_name) + if not inspect.isclass(module_item): + continue if issubclass(module_item, ProxyDataAPI): if module_item != ProxyDataAPI: api = module_item() api.fetchData() + break diff --git a/colab/proxy/utils/plugin.py b/colab/proxy/utils/plugin.py index b8a3ae3..52a1a4b 100644 --- a/colab/proxy/utils/plugin.py +++ b/colab/proxy/utils/plugin.py @@ -34,7 +34,7 @@ class ColabPlugin(object): Example of code hotspot, might be called somewhere in the code from: - from colab.proxy.proxy.plugin import plugin_hotspot + from colab.proxy.utils.plugin import plugin_hotspot from colab.settings import PROXIED_APPS -- libgit2 0.21.2