Toward running quay in a docker container.

This commit is contained in:
jakedt 2014-04-07 01:20:09 -04:00
parent 6e2b8d96b8
commit 8e9faf6121
11 changed files with 138 additions and 38 deletions

View file

@ -1,7 +1,7 @@
import logging
import json
from app import mixpanel
from app import analytics
from flask import request, abort as flask_abort, make_response, current_app
from auth.auth_context import get_authenticated_user, get_validated_token
@ -32,10 +32,10 @@ def abort(status_code, message=None, issue=None, headers=None, **kwargs):
auth_user = get_authenticated_user()
auth_token = get_validated_token()
if auth_user:
mixpanel.track(auth_user.username, 'http_error', params)
analytics.track(auth_user.username, 'http_error', params)
message = '%s (user: %s)' % (message, auth_user.username)
elif auth_token:
mixpanel.track(auth_token.code, 'http_error', params)
analytics.track(auth_token.code, 'http_error', params)
message = '%s (token: %s)' % (message,
auth_token.friendly_name or auth_token.code)