Permalink
Browse files

If numpy isn't installed, recover gracefully and don't load geocamTie…

…point
  • Loading branch information...
1 parent cd6ef94 commit f4cc07701aa1db6fb1721c4d03f2fc13598c43ea @deleted deleted committed Jul 19, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 siteSettings.py
View
@@ -20,6 +20,7 @@
TEMPLATE_DEBUG = DEBUG
import os
import sys
+import logging
from django.conf import global_settings
from django.core.files.storage import default_storage
@@ -167,11 +168,10 @@
INSTALLED_APPS = (
'responderMaps',
'geocamMapSet',
- 'geocamTiePoint',
+ #'geocamTiePoint',
'geocamCore',
'geocamFolder',
'geocamUtil',
- #'geocamTiePoint',
'django_digest',
@@ -183,6 +183,12 @@
'django.contrib.sites',
)
+try:
+ import numpy
+ INSTALLED_APPS += ('geocamTiePoint',)
+except ImportError:
+ logging.warning("Could not import numpy. geocamTiePoint will not be installed")
+
GEOCAM_UTIL_SECURITY_ENABLED = False # not USING_DJANGO_DEV_SERVER
GEOCAM_UTIL_SECURITY_SSL_REQUIRED_BY_DEFAULT = False
GEOCAM_UTIL_SECURITY_REQUIRE_ENCRYPTED_PASSWORDS = False

0 comments on commit f4cc077

Please sign in to comment.