Skip to content

Commit

Permalink
raise ImportError on attempt to load decorators with no uWSGI instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene MechanisM committed Apr 4, 2015
1 parent 25f449d commit e8e6acf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions django_uwsgi/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
from django_uwsgi import uwsgi, pickle


if uwsgi is None:
raise ImportError("uWSGI is not available")

if uwsgi.masterpid() == 0:
raise Exception(
"you have to enable the uWSGI master process to use this module")
Expand Down

0 comments on commit e8e6acf

Please sign in to comment.