From 6606b10870e16e5eadcc88f67564da492b4b6e08 Mon Sep 17 00:00:00 2001 From: Olexiy Strashko Date: Sat, 13 Aug 2011 19:28:44 +0300 Subject: Fixed opened issue #193 (exception on windows when working with file path): - change '/' path separator usage to os.sep --- debug_toolbar/panels/profiling.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'debug_toolbar') 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('{0}/{1} in {3}({2})'.format( file_path, -- cgit v1.2.3