Tidy up oauth imports slightly

This commit is contained in:
Tom Christie 2011-06-30 08:52:55 +01:00
parent 5d61ff3508
commit 8bafa01abd
2 changed files with 5 additions and 5 deletions

View File

@ -84,7 +84,7 @@ TEMPLATE_DIRS = (
# Don't forget to use absolute paths, not relative paths.
)
INSTALLED_APPS = [
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
@ -95,15 +95,15 @@ INSTALLED_APPS = [
# 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

View File

@ -15,7 +15,7 @@ try:
from oauth_provider.decorators import oauth_required
from oauth_provider.models import Resource, Consumer, Token
except:
except ImportError:
pass
else: