Use correct classname for DoesNotExist exception
authorMagnus Hagander <magnus@hagander.net>
Thu, 1 Dec 2011 14:45:25 +0000 (15:45 +0100)
committerMagnus Hagander <magnus@hagander.net>
Thu, 1 Dec 2011 14:45:25 +0000 (15:45 +0100)
pgweb/downloads/views.py

index 173b41e931458f658ff2390d9dd46d448b7718d2..0f8ec3daff57365b3fce2c913136565727f01190 100644 (file)
@@ -130,7 +130,7 @@ def _mirror_redirect_internal(request, scheme, host, path):
 def mirror_redirect(request, mirrorid, protocol, path):
        try:
                mirror = Mirror.objects.get(pk=mirrorid)
-       except Mirror.NotFound:
+       except Mirror.DoesNotExist:
                raise Http404("Specified mirror not found")
 
        return _mirror_redirect_internal(