incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [47/50] git commit: don't cause a fatal error to occur if failing to create/fetch a user-project for icon purposes
Date Fri, 14 Dec 2012 15:03:30 GMT
don't cause a fatal error to occur if failing to create/fetch a user-project for icon purposes


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/1f771442
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/1f771442
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/1f771442

Branch: refs/heads/ph/4655
Commit: 1f771442609cfa4356c30dc71f7d82882e45a594
Parents: 5d1ffe0
Author: Dave Brondsema <dbrondsema@geek.net>
Authored: Tue Dec 11 20:18:30 2012 +0000
Committer: Dave Brondsema <dbrondsema@geek.net>
Committed: Tue Dec 11 20:18:30 2012 +0000

----------------------------------------------------------------------
 Allura/allura/model/auth.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1f771442/Allura/allura/model/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index b9b11d5..d676e74 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -481,7 +481,11 @@ class User(MappedClass, ActivityNode, ActivityObject):
     @memoize
     def icon_url(self):
         icon_url = None
-        private_project = self.private_project()
+        try:
+            private_project = self.private_project()
+        except:
+            log.warn('Error getting/creating user-project for %s', self.username, exc_info=True)
+            private_project = None
         if private_project and private_project.icon:
             icon_url = self.url()+'user_icon'
         elif self.preferences.email_address:


Mime
View raw message