diff options
| -rw-r--r-- | repoze/bfg/path.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/repoze/bfg/path.py b/repoze/bfg/path.py index a578d488b..11fbbcb0e 100644 --- a/repoze/bfg/path.py +++ b/repoze/bfg/path.py @@ -21,6 +21,8 @@ def package_name(pkg_or_module): package name of the package in which the module lives. If this function is passed a package, return the dotted Python package name of the package itself.""" + if pkg_or_module is None: + return '__main___' pkg_filename = pkg_or_module.__file__ pkg_name = pkg_or_module.__name__ splitted = os.path.split(pkg_filename) |
