Permalink
Browse files

try to run deactivating code but handle exception silently for now

  • Loading branch information...
jonathan
jonathan committed Mar 3, 2011
1 parent 495aba5 commit d75284f6f30a7aa0eedabd30f835148b02f03853
Showing with 5 additions and 2 deletions.
  1. +5 −2 main.py
View
@@ -83,8 +83,11 @@ def signin(cls, email, type):
name = string.capwords(email.split('@')[0].replace('.', ' '))
# prevents double signin...
previous_signin = db.GqlQuery("SELECT * FROM Signin WHERE email = '%s' AND active = true" % email).get()
- if previous_signin is not None:
- cls.deactivate_staffer(email)
+ if previous_signin:
+ try:
+ cls.deactivate_staffer(email)
+ except:
+ logging.info("Failed deactivating old Signin object.")
s = Signin(email=email, type=type, image_url=image, name=name)
s.put()
return s

0 comments on commit d75284f

Please sign in to comment.