Commits

Matthew Schinckel committed 9101d8c

Possible fix for pull-request #6.

Comments (0)

Files changed (1)

timedelta/__init__.py

 __version__ = open(os.path.join(os.path.dirname(__file__), "VERSION")).read().strip()
 
 try:
-    from fields import TimedeltaField
-    from helpers import (
-        divide, multiply, modulo, 
-        parse, nice_repr, 
-        percentage, decimal_percentage,
-        total_seconds
-    )
+    from django.core.exceptions import ImproperlyConfigured
 except ImportError:
-    pass
+    pass
+else:
+    try:
+        from fields import TimedeltaField
+        from helpers import (
+            divide, multiply, modulo, 
+            parse, nice_repr, 
+            percentage, decimal_percentage,
+            total_seconds
+        )
+    except (ImportError, ImproperlyConfigured):
+        pass