Change exception from legacy code.

Change all except: clause to except Exception as e:  for further revise.
This commit is contained in:
林檎
2017-03-06 11:53:17 +08:00
parent 0bc4f52783
commit 6e3d4877ed
4 changed files with 24 additions and 25 deletions
+2 -2
View File
@@ -439,7 +439,7 @@ def create_anonymous_user():
session.add(user)
try:
session.commit()
except:
except Exception as e:
session.rollback()
pass
@@ -457,7 +457,7 @@ def create_admin_user():
session.add(user)
try:
session.commit()
except:
except Exception as e:
session.rollback()
pass