Commits

Arne Brodowski committed a2b1c4b

django 1.2.x does not support resolve().url_name

Comments (0)

Files changed (1)

dogslow/__init__.py

             if hasattr(settings, 'DOGSLOW_LOGGER'):
                 logger = logging.getLogger(getattr(settings, 'DOGSLOW_LOGGER'))
                 logger.warn('Slow Request Watchdog: %s, %%s - %%s' %
-                            resolve(request.META.get('PATH_INFO')).url_name,
+                            resolve(request.META.get('PATH_INFO'))[0],
                             req_string.encode('utf-8'), output)
 
         except Exception:
         name is listed in settings.DOGSLOW_IGNORE_URLS.
         """
         match = resolve(request.META.get('PATH_INFO'))
-        return match and (match.url_name in
+        return match and (getattr(match, 'url_name', '') in
                        getattr(settings, 'DOGSLOW_IGNORE_URLS', ()))
 
     def process_request(self, request):