Commits

Josh VanderLinden committed 830e80e

Made bibliophile play a bit better when you don't have pyaws installed.

Comments (0)

Files changed (1)

bibliophile/models.py

 from django.core.urlresolvers import reverse
 from django.utils.safestring import mark_safe
 from datetime import date
-from pyaws import ecs
 
-CAN_PERFORM_AMAZON_LOOKUP = getattr(settings, 'AMAZON_AWS_KEY', False)
+try:
+    from pyaws import ecs
+    CAN_PERFORM_AMAZON_LOOKUP = getattr(settings, 'AMAZON_AWS_KEY', False)
+except ImportError:
+    CAN_PERFORM_AMAZON_LOOKUP = False
 
 if CAN_PERFORM_AMAZON_LOOKUP:
     ecs.setLicenseKey(CAN_PERFORM_AMAZON_LOOKUP)