Commits

Mikhail Korobov committed 930c00d

Simple patch to prevent pkg variable being not created. Thanks Brian Hong.

Comments (0)

Files changed (2)

 Mikhail Korobov <kmike84@gmail.com>
 Brandon Konkle <brandon@brandonkonkle.com>
 idahogray
+

django_coverage/utils/module_tools/module_loader.py

     if pkg_name in sys.modules:
         if fp in sys.modules[pkg_name].__path__:
             pkg = sys.modules[pkg_name]
+        else:
+            pkg = None
     else:
         pkg = _brute_force_find_module(pkg_name, fp, mtype)
     if not pkg: