Skip to content

Commit

Permalink
Add no-op decorator for older Django
Browse files Browse the repository at this point in the history
This will prevent a crash.
  • Loading branch information
ferrix committed May 30, 2015
1 parent 1c9b01c commit a58868d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cumulus/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@

from django.core.files.storage import Storage
from django.core.files.base import File, ContentFile
from django.utils.deconstruct import deconstructible

try:
from django.utils.deconstruct import deconstructible
except ImportError:
# Make a no-op decorator to avoid errors
def deconstructible(*args, **kwargs):
def decorator(klass):
return klass

if not args:
return decorator
return decorator(*args, **kwargs)

from cumulus.authentication import Auth
from cumulus.settings import CUMULUS
Expand Down

0 comments on commit a58868d

Please sign in to comment.