diff --git a/privex/helpers/__init__.py b/privex/helpers/__init__.py index 5aa856d..a86ca3e 100644 --- a/privex/helpers/__init__.py +++ b/privex/helpers/__init__.py @@ -67,17 +67,24 @@ class ImproperlyConfigured(Exception): """Placeholder in-case this fails to import from django.core.exceptions""" pass +class AppRegistryNotReady(Exception): + """Placeholder in-case this fails to import from django.core.exceptions""" + pass + # Only import the Django functions if Django is actually installed try: import django - from django.core.exceptions import ImproperlyConfigured + from django.core.exceptions import ImproperlyConfigured, AppRegistryNotReady from privex.helpers.django import * except ImportError: log.debug('privex.helpers __init__ failed to import "django", not loading django helpers') pass -except ImproperlyConfigured: +except (ImproperlyConfigured, AppRegistryNotReady): log.debug('privex.helpers __init__ failed to import "django", not loading django helpers') pass +except Exception: + log.debug('privex.helpers __init__ failed to import "django", (unknown exception) not loading django helpers') + pass from privex.helpers.common import * diff --git a/setup.py b/setup.py index f3eaee3..98c32ad 100755 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ setup( name='privex_helpers', - version='1.1.1', + version='1.1.2', description='A variety of helper functions and classes, useful for many different projects', long_description=long_description,