=== modified file 'lava_projects/models.py'
@@ -17,7 +17,6 @@
# along with LAVA Server. If not, see <http://www.gnu.org/licenses/>.
from django.contrib.auth.models import User
-from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from django.db.models.query import QuerySet
from django.utils.translation import ugettext as _
@@ -42,9 +41,8 @@
return self.get(identifier=identifier)
except Project.DoesNotExist as no_such_project:
try:
- p_f_ir = ProjectFormerIdentifier.objects.get(
- former_identifier=identifier)
- return p_f_i.project
+ return ProjectFormerIdentifier.objects.get(
+ former_identifier=identifier).project
except ProjectFormerIdentifier.DoesNotExist:
raise no_such_project
=== modified file 'lava_projects/views.py'
@@ -18,11 +18,15 @@
from django.contrib.auth.decorators import login_required
from django.http import (
- HttpResponse, HttpResponseRedirect, HttpResponseForbidden)
-from django.shortcuts import render_to_response, get_object_or_404
+ Http404,
+ HttpResponse,
+ HttpResponseForbidden,
+ HttpResponseRedirect,
+)
+from django.shortcuts import get_object_or_404
from django.template import RequestContext, loader
from django.utils.translation import ugettext as _
-from django.views.generic.list_detail import object_list, object_detail
+from django.views.generic.list_detail import object_list
from lava_server.bread_crumbs import (
BreadCrumb,
@@ -184,7 +188,7 @@
form = ProjectRenameForm(project, request.POST)
if form.is_valid():
# Remove old entry if we are reusing our older identifier
- pfi = ProjectFormerIdentifier.objects.filter(
+ ProjectFormerIdentifier.objects.filter(
former_identifier=form.cleaned_data['identifier'],
project=project.pk).delete()
# Record the change taking place
=== modified file 'lava_server/extension.py'
@@ -264,7 +264,7 @@
"""
try:
extension_cls = entrypoint.load()
- except ImportError as ex:
+ except ImportError:
logging.exception(
"Unable to load extension entry point: %r", entrypoint)
raise ExtensionLoadError(
=== modified file 'lava_server/settings/development.py'
@@ -18,8 +18,6 @@
import os
-from django.core.exceptions import ImproperlyConfigured
-
from lava_server.extension import loader
from lava_server.settings.common import *
=== modified file 'lava_server/urls.py'
@@ -20,7 +20,6 @@
from django.conf.urls.defaults import (
handler404, handler500, include, patterns, url)
from django.contrib import admin
-from django.views.generic.simple import direct_to_template
from staticfiles.urls import staticfiles_urlpatterns
from linaro_django_xmlrpc import urls as api_urls