Skip to content

Commit

Permalink
Tidy up oauth imports slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchristie committed Jun 30, 2011
1 parent 5d61ff3 commit 8bafa01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions djangorestframework/runtests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
# Don't forget to use absolute paths, not relative paths.
)

INSTALLED_APPS = [
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
Expand All @@ -95,15 +95,15 @@
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'djangorestframework',
]
)

# OAuth support is optional, so we only test oauth if it's installed.
try:
import oauth_provider
except:
except ImportError:
pass
else:
INSTALLED_APPS.append('oauth_provider')
INSTALLED_APPS += ('oauth_provider',)

# If we're running on the Jenkins server we want to archive the coverage reports as XML.
import os
Expand Down
2 changes: 1 addition & 1 deletion djangorestframework/tests/oauthentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from oauth_provider.decorators import oauth_required
from oauth_provider.models import Resource, Consumer, Token

except:
except ImportError:
pass

else:
Expand Down

0 comments on commit 8bafa01

Please sign in to comment.