diff options
| author | Olexiy Strashko | 2011-08-13 19:28:44 +0300 |
|---|---|---|
| committer | Olexiy Strashko | 2011-08-13 19:28:44 +0300 |
| commit | 6606b10870e16e5eadcc88f67564da492b4b6e08 (patch) | |
| tree | 142681e58d9a568aba6f1f6d18e1ee51dcd2a328 | |
| parent | 6e3d9da54cffb41461c6778c55b0461410a9655c (diff) | |
| download | django-debug-toolbar-6606b10870e16e5eadcc88f67564da492b4b6e08.tar.bz2 | |
Fixed opened issue #193 (exception on windows when working with file path):
- change '/' path separator usage to os.sep
| -rw-r--r-- | debug_toolbar/panels/profiling.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/debug_toolbar/panels/profiling.py b/debug_toolbar/panels/profiling.py index b3dedf8..289e1f7 100644 --- a/debug_toolbar/panels/profiling.py +++ b/debug_toolbar/panels/profiling.py @@ -16,6 +16,7 @@ from cStringIO import StringIO import cProfile from pstats import Stats from colorsys import hsv_to_rgb +import os class DjangoDebugToolbarStats(Stats): __root = None @@ -64,7 +65,7 @@ class FunctionCall(object): if idx > -1: file_name=file_name[idx+14:] - file_path, file_name = file_name.rsplit('/', 1) + file_path, file_name = file_name.rsplit(os.sep, 1) return mark_safe('<span class="path">{0}/</span><span class="file">{1}</span> in <span class="func">{3}</span>(<span class="lineno">{2}</span>)'.format( file_path, |
