Skip to content

TimerPanel fails with AttributeError on Windows: #231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
andialbrecht opened this issue Nov 15, 2011 · 3 comments
Closed

TimerPanel fails with AttributeError on Windows: #231

andialbrecht opened this issue Nov 15, 2011 · 3 comments

Comments

@andialbrecht
Copy link
Contributor

TimerPanel fails with AttributError on Windows:

File "/home/andi/devel/dlgi/django/core/handlers/base.py" in get_response
  188.                 response = middleware_method(request, response)
File "/home/andi/devel/dlgi/debug_toolbar/panels/timer.py" in process_response
  36.         utime = 1000 * self._elapsed_ru('ru_utime')
File "/home/andi/devel/dlgi/debug_toolbar/panels/timer.py" in _elapsed_ru
  92.         return getattr(self._end_rusage, name) - getattr(self._start_rusage, name)

Exception Type: AttributeError at /certids/1/
Exception Value: 'TimerDebugPanel' object has no attribute '_end_rusage'

Starting with dddfb11 the Timer panel stopped working when resource isn't available on the system.

@zsiciarz
Copy link

Confirmed. On Windows only the total_time value is available, so the calculations calling self._elapsed_ru should be moved under the if self.has_resource check.

@andialbrecht
Copy link
Contributor Author

BTW pull request is here: #232

@dcramer
Copy link
Contributor

dcramer commented Nov 24, 2011

Closing this as fixed in #232

@dcramer dcramer closed this as completed Nov 24, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants