[Mpuls-commits] r2255 - in wasko/branches/2.0: . mpulsweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Mar 29 20:37:03 CEST 2010
Author: bh
Date: 2010-03-29 20:37:01 +0200 (Mon, 29 Mar 2010)
New Revision: 2255
Modified:
wasko/branches/2.0/ChangeLog
wasko/branches/2.0/mpulsweb/model/user.py
Log:
* mpulsweb/model/user.py (UserGroupList.__init__)
(UserGroupFactory.create, UserGroupFactory.load)
(UserGroup.setUser, UserGroup._getCurrentUserIds)
(UserGroup.delete, UserGroup.store, UserListObject.__init__): Turn
prints to stderr in exception handlers into log.exception calls.
Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog 2010-03-29 16:36:44 UTC (rev 2254)
+++ wasko/branches/2.0/ChangeLog 2010-03-29 18:37:01 UTC (rev 2255)
@@ -1,5 +1,13 @@
2010-03-29 Bernhard Herzog <bh at intevation.de>
+ * mpulsweb/model/user.py (UserGroupList.__init__)
+ (UserGroupFactory.create, UserGroupFactory.load)
+ (UserGroup.setUser, UserGroup._getCurrentUserIds)
+ (UserGroup.delete, UserGroup.store, UserListObject.__init__): Turn
+ prints to stderr in exception handlers into log.exception calls.
+
+2010-03-29 Bernhard Herzog <bh at intevation.de>
+
* mpulsweb/model/news.py: Remove unused imports.
2010-03-29 Bernhard Herzog <bh at intevation.de>
Modified: wasko/branches/2.0/mpulsweb/model/user.py
===================================================================
--- wasko/branches/2.0/mpulsweb/model/user.py 2010-03-29 16:36:44 UTC (rev 2254)
+++ wasko/branches/2.0/mpulsweb/model/user.py 2010-03-29 18:37:01 UTC (rev 2255)
@@ -102,7 +102,7 @@
finally:
db.recycleConnection(conn, cur)
except StandardError, err:
- print >> sys.stderr, "Error on creating user group overview: %s" % str(err)
+ log.exception("Error while creating user group overview")
def getGroupList(self, filter):
if filter:
@@ -129,7 +129,7 @@
finally:
db.recycleConnection(conn, cur)
except StandardError, err:
- print >> sys.stderr, "Error on creating usergroup: %s" % str(err)
+ log.exception("Error while creating usergroup")
return group
def load(self, id):
@@ -148,7 +148,7 @@
finally:
db.recycleConnection(conn, cur)
except StandardError, err:
- print >> sys.stderr, "Error on loading user group overview: %s" % str(err)
+ log.exception("Error while loading user group overview")
return group
@@ -191,7 +191,7 @@
finally:
db.recycleConnection(conn, cur)
except StandardError, err:
- print >> sys.stderr, "Error on setting userids in group: %s" % str(err)
+ log.exception("Error while setting userids in group")
def _getCurrentUserIds(self):
list = []
@@ -207,7 +207,7 @@
finally:
db.recycleConnection(conn, cur)
except StandardError, err:
- print >> sys.stderr, "Error on geting userids in group: %s" % str(err)
+ log.exception("Error while geting userids in group")
return list
def getUser(self):
@@ -232,7 +232,7 @@
finally:
db.recycleConnection(conn, cur)
except StandardError, err:
- print >> sys.stderr, "Error on creating usergroup: %s" % str(err)
+ log.exception("Error while creating usergroup")
def store(self):
'''Stores the data the usergroup object in the database (UPDATE)'''
@@ -247,7 +247,7 @@
finally:
db.recycleConnection(conn, cur)
except StandardError, err:
- print >> sys.stderr, "Error on creating usergroup: %s" % str(err)
+ log.exception("Error while creating usergroup")
class UserListObject:
@@ -273,7 +273,7 @@
finally:
db.recycleConnection(conn, cur)
except StandardError, err:
- print >> sys.stderr, "Error on creating user overview: %s" % str(err)
+ log.exception("Error while creating user overview")
def getAdminList(self, filter=None):
admins = [e for e in self.user if e.isAdmin()]
More information about the Mpuls-commits
mailing list