diff --git a/endpoints/index.py b/endpoints/index.py index 00020d317..40c5f5368 100644 --- a/endpoints/index.py +++ b/endpoints/index.py @@ -1,6 +1,4 @@ import json -import urllib -import json import logging import urlparse @@ -11,7 +9,7 @@ from data import model from app import app, mixpanel from auth.auth import (process_auth, get_authenticated_user, get_validated_token) -from util.names import parse_namespace_repository, parse_repository_name +from util.names import parse_repository_name from util.email import send_confirmation_email from auth.permissions import (ModifyRepositoryPermission, UserPermission, ReadRepositoryPermission, @@ -54,7 +52,7 @@ def create_user(): if username == '$token': try: - token = model.load_token_data(password) + model.load_token_data(password) return make_response('Verified', 201) except model.InvalidTokenException: abort(401) @@ -130,7 +128,7 @@ def create_repository(namespace, repository): abort(403) else: - permission = CreateRepoPermission('namespace') + permission = CreateRepositoryPermission('namespace') if not permission.can(): logger.info('Attempt to create a new repo with insufficient perms.') abort(403) @@ -151,7 +149,7 @@ def create_repository(namespace, repository): existing.delete_instance(recursive=True) for image_description in added_images.values(): - image = model.create_image(image_description['id'], repo) + model.create_image(image_description['id'], repo) response = make_response('Created', 201)