You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2012/10/26 22:32:54 UTC

[12/16] git commit: [#3883] Fix a bug causing AttributeError if using paster shell.

[#3883] Fix a bug causing AttributeError if using paster shell.

Signed-off-by: Peter Hartmann <ma...@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/cj/5145
Commit: 6f41364e910670e25b80e82b5d56494887d72fe6
Parents: 51024f4
Author: Peter Hartmann <ma...@gmail.com>
Authored: Wed Sep 12 15:50:57 2012 +0200
Committer: Cory Johns <jo...@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