Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

catch al lexception

  • Loading branch information...
commit d040fe854427796ac9f0b8d97f64eca354c9b61e 1 parent 63ba659
Mike Krieger authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  greetings/views.py
View
3  greetings/views.py
@@ -22,7 +22,7 @@ def card_from_hash(request, hash):
try:
card = Card.objects.get(short_hash=hash)
return get_greeting(request, card)
- except ObjectDoesNotExist, e:
+ except Exception, e:
json_response['success'] = False
json_response['error'] = str(e)
return HttpResponse(simplejson.dumps(json_response))
@@ -248,6 +248,7 @@ def check_or_make_dir(dirname):
raise
def add_attachment(request):
+ print "Attaching..."
json_response = dict()
if check_request_parameters(request, ('card_id', 'hash', 'type')) and request.FILES:
try:
Please sign in to comment.
Something went wrong with that request. Please try again.