1. David Bennett
  2. django-private-media

Commits

David Bennett  committed 2fc7ba9

Ok, learned something… "except Exception as e" is new in Python 2.6.

  • Participants
  • Parent commits 0146080
  • Branches default

Comments (0)

Files changed (1)

File private_media/views.py

View file
     try:
         key = urlsafe_b64decode(str(b64_key) + '==')
         content_type_id, object_id, field_name = key.split('/', 2)
-    except Exception as e:
+    except Exception, e:
         raise Http404(e if settings.DEBUG else 'File not found.')
     return get_file(request, content_type_id, object_id, field_name, file_name)