Created
May 11, 2012 04:47
-
-
Save youhei/2657599 to your computer and use it in GitHub Desktop.
using try-else block in actual case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# South support; see http://south.aeracode.org/docs/tutorial/part4.html#simple-inheritance | |
try: | |
from south.modelsinspector import add_introspection_rules | |
except ImportError: | |
pass | |
else: | |
add_introspection_rules([], [r"^picklefield\.fields\.PickledObjectField"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
import sqlalchemy # noqa | |
except ImportError: | |
DatabaseBackend = Task = TaskSet = None | |
else: | |
from celery.backends.database import DatabaseBackend | |
from celery.db.models import Task, TaskSet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment