Skip to content

Commit

Permalink
[refs torchbox#14] Add try except import error logic
Browse files Browse the repository at this point in the history
  • Loading branch information
vrocha committed Feb 13, 2018
1 parent c2a0aa3 commit 20c0e0b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion experiments/middleware.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from django.utils.deprecation import MiddlewareMixin
try:
from django.utils.deprecation import MiddlewareMixin
except ImportError:
MiddlewareMixin = object

from . models import Experiment
from .utils import get_user_id
Expand Down

0 comments on commit 20c0e0b

Please sign in to comment.