Permalink
Browse files

show error for IllegalFilenameExceptions in red roar

  • Loading branch information...
1 parent f43caec commit 1077a133ccd0fb60df03b3d7ea3d0818cddfc68c @seanmonstar seanmonstar committed Jun 27, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 apps/jetpack/views.py
View
@@ -38,7 +38,8 @@
create_package_from_xpi)
from jetpack.models import (Package, PackageRevision, Module, Attachment, SDK,
EmptyDir, EDITABLE_EXTENSIONS)
-from jetpack.errors import FilenameExistException, DependencyException
+from jetpack.errors import (FilenameExistException, DependencyException,
+ IllegalFilenameException)
from person.models import Profile
@@ -911,6 +912,8 @@ def save(request, id_number, type_id, revision_number=None,
except JSONDecodeError:
return HttpResponseBadRequest(
'Extra package properties were invalid JSON.')
+ except IllegalFilenameException, e:
+ return HttpResponseBadRequest(str(e))
response_data['package_extra_json'] = extra_json

0 comments on commit 1077a13

Please sign in to comment.