diff options
Diffstat (limited to 'python/helpers/pydev/django_debug.py')
-rw-r--r-- | python/helpers/pydev/django_debug.py | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/python/helpers/pydev/django_debug.py b/python/helpers/pydev/django_debug.py index 37ee04299cc6..417ff0190e84 100644 --- a/python/helpers/pydev/django_debug.py +++ b/python/helpers/pydev/django_debug.py @@ -1,28 +1,19 @@ import inspect -from django_frame import DjangoTemplateFrame, get_template_file_name, get_template_line +from django_frame import DjangoTemplateFrame from pydevd_comm import CMD_SET_BREAK -from pydevd_constants import DJANGO_SUSPEND, GetThreadId -from pydevd_file_utils import NormFileToServer -from runfiles import DictContains +from pydevd_constants import DJANGO_SUSPEND, GetThreadId, DictContains from pydevd_breakpoints import LineBreakpoint import pydevd_vars import traceback class DjangoLineBreakpoint(LineBreakpoint): - def __init__(self, type, file, line, flag, condition, func_name, expression): - self.file = file - self.line = line - LineBreakpoint.__init__(self, type, flag, condition, func_name, expression) - def __eq__(self, other): - if not isinstance(other, DjangoLineBreakpoint): - return False - return self.file == other.file and self.line == other.line + def __init__(self, file, line, condition, func_name, expression): + self.file = file + LineBreakpoint.__init__(self, line, condition, func_name, expression) - def is_triggered(self, frame): - file = get_template_file_name(frame) - line = get_template_line(frame) - return self.file == file and self.line == line + def is_triggered(self, template_frame_file, template_frame_line): + return self.file == template_frame_file and self.line == template_frame_line def __str__(self): return "DjangoLineBreakpoint: %s-%d" %(self.file, self.line) |