mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
Fix auth-related errors breaking unit tests.
This commit is contained in:
parent
0c7a4b9f60
commit
84e89ab6f8
@ -39,6 +39,7 @@ class TokenAuthentication(authentication.TokenAuthentication):
|
||||
if token:
|
||||
token = urllib.unquote(token).strip('"')
|
||||
return 'token %s' % token
|
||||
return ''
|
||||
|
||||
def authenticate(self, request):
|
||||
self.request = request
|
||||
|
@ -76,11 +76,8 @@ include(optional('/etc/tower/conf.d/*.py'), scope=locals())
|
||||
# default settings for development. If not present, we can still run using
|
||||
# only the defaults.
|
||||
try:
|
||||
include(
|
||||
optional('local_*.py'),
|
||||
'postprocess.py',
|
||||
scope=locals(),
|
||||
)
|
||||
include(optional('local_*.py'), scope=locals())
|
||||
include('postprocess.py', scope=locals())
|
||||
except ImportError:
|
||||
traceback.print_exc()
|
||||
sys.exit(1)
|
||||
|
@ -108,12 +108,8 @@ settings_file = os.environ.get('AWX_SETTINGS_FILE',
|
||||
# Attempt to load settings from /etc/tower/settings.py first, followed by
|
||||
# /etc/tower/conf.d/*.py.
|
||||
try:
|
||||
include(
|
||||
settings_file,
|
||||
optional(settings_files),
|
||||
'postprocess.py',
|
||||
scope=locals(),
|
||||
)
|
||||
include(settings_file, optional(settings_files), scope=locals())
|
||||
include('postprocess.py', scope=locals())
|
||||
except ImportError:
|
||||
traceback.print_exc()
|
||||
sys.exit(1)
|
||||
|
Loading…
Reference in New Issue
Block a user