Sfoglia il codice sorgente

Merge pull request #32 from lnyemba/v2.2.0

bug fixes: conditional imports
Steve L. Nyemba 1 giorno fa
parent
commit
dd9fd27e71
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      transport/__init__.py

+ 1 - 1
transport/__init__.py

@@ -55,7 +55,7 @@ def init():
     global PROVIDERS
     for _module in [cloud,sql,nosql,other,warehouse] :
         for _provider_name in dir(_module) :
-            if _provider_name.startswith('__') or _provider_name == 'common':
+            if _provider_name.startswith('__') or _provider_name == 'common' or type(_module) in [None,str,dict]:
                 continue
             PROVIDERS[_provider_name] = {'module':getattr(_module,_provider_name),'type':_module.__name__}
     #