incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [10/17] git commit: [#3883] Fix a bug causing AttributeError if using paster shell.
Date Wed, 24 Oct 2012 16:57:17 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/0bc17cff
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/0bc17cff
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/0bc17cff

Branch: refs/heads/cj/5145
Commit: 0bc17cff30aab1b251d4c03f7ae87b1a4af6a9a0
Parents: ff67745
Author: Peter Hartmann <mailbox.tec@gmail.com>
Authored: Wed Sep 12 15:50:57 2012 +0200
Committer: Cory Johns <johnsca@geek.net>
Committed: Wed Oct 24 16:56:29 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/0bc17cff/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