Commits

Vincent Hillenbrink  committed 9693eaa

Less is more: fixed bug with default value in get_django_setting

  • Participants
  • Parent commits e62b9af

Comments (0)

Files changed (1)

File bin/djenvlib

     fi
 
     DJANGO_SETTINGS_MODULE=$settings_module python << EOF
-try:
-    from django.conf import settings
-except ImportError:
-    print '$2'
-    raise
-else:
-    try:
-        print getattr(settings, '`echo $1 | tr 'a-z' 'A-Z'`', '')
-    except KeyError:
-        print '$2'
+from django.conf import settings
+print getattr(settings, '`echo $1 | tr 'a-z' 'A-Z'`', '$2')
 EOF
 }