Browse Source

Small change in stopwatch middleware

Ralfp 12 years ago
parent
commit
bc4aec8d89
1 changed files with 1 additions and 2 deletions
  1. 1 2
      misago/stopwatch/middleware.py

+ 1 - 2
misago/stopwatch/middleware.py

@@ -7,10 +7,9 @@ class StopwatchMiddleware(object):
 
 
     def process_response(self, request, response):
     def process_response(self, request, response):
         try:
         try:
-            time = request.stopwatch.time()
             if settings.STOPWATCH_LOG:
             if settings.STOPWATCH_LOG:
                 stat_file = open(settings.STOPWATCH_LOG, 'a')
                 stat_file = open(settings.STOPWATCH_LOG, 'a')
-                stat_file.write("%s %s s\n" % (request.path_info, time))
+                stat_file.write("%s %s s\n" % (request.path_info, request.stopwatch.time()))
                 stat_file.close()
                 stat_file.close()
         except AttributeError:
         except AttributeError:
             pass
             pass