incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [12/15] git commit: [#3883] Fix a bug causing AttributeError if using paster shell.
Date Fri, 26 Oct 2012 20:56:57 GMT
[#3883] Fix a bug causing AttributeError if using paster shell.

Signed-off-by: Peter Hartmann <mailbox.tec@gmail.com>


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

Branch: refs/heads/master
Commit: 6f41364e910670e25b80e82b5d56494887d72fe6
Parents: 51024f4
Author: Peter Hartmann <mailbox.tec@gmail.com>
Authored: Wed Sep 12 15:50:57 2012 +0200
Committer: Cory Johns <johnsca@geek.net>
Committed: Fri Oct 26 20:28:37 2012 +0000

----------------------------------------------------------------------
 Allura/allura/lib/custom_middleware.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6f41364e/Allura/allura/lib/custom_middleware.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/custom_middleware.py b/Allura/allura/lib/custom_middleware.py
index 6075653..e6a1d68 100644
--- a/Allura/allura/lib/custom_middleware.py
+++ b/Allura/allura/lib/custom_middleware.py
@@ -186,6 +186,6 @@ class AlluraTimerMiddleware(TimerMiddleware):
         ]
 
     def before_logging(self, stat_record):
-        if c.app and c.app.config:
+        if hasattr(c, "app") and hasattr(c.app, "config"):
             stat_record.add('request_category', c.app.config.tool_name.lower())
         return stat_record


Mime
View raw message