Fix ImportError after refactoring (PY-21487)
[idea/community.git] / python / helpers / pydev / pydevd_concurrency_analyser / pydevd_concurrency_logger.py
index 6fe9fe06a72a1632f0cc1b2299893994ab6deea6..b3cc4ca9a2fe32850da6182e427e60d34f8253af 100644 (file)
@@ -1,8 +1,7 @@
-import time
 from pydevd_concurrency_analyser.pydevd_thread_wrappers import ObjectWrapper, wrap_attr
 
 import pydevd_file_utils
-from _pydevd_bundle import pydevd_vars
+from _pydevd_bundle import pydevd_xml
 from _pydev_bundle._pydev_filesystem_encoding import getfilesystemencoding
 from _pydevd_bundle.pydevd_constants import dict_contains, get_thread_id, IS_PY3K
 
@@ -72,10 +71,10 @@ def get_text_list_for_frame(frame):
             #print "line is ", myLine
 
             #the variables are all gotten 'on-demand'
-            #variables = pydevd_vars.frame_vars_to_xml(curFrame.f_locals)
+            #variables = pydevd_xml.frame_vars_to_xml(curFrame.f_locals)
 
             variables = ''
-            cmdTextList.append('<frame id="%s" name="%s" ' % (myId , pydevd_vars.make_valid_xml_value(myName)))
+            cmdTextList.append('<frame id="%s" name="%s" ' % (myId , pydevd_xml.make_valid_xml_value(myName)))
             cmdTextList.append('file="%s" line="%s">' % (quote(myFile, '/>_= \t'), myLine))
             cmdTextList.append(variables)
             cmdTextList.append("</frame>")
@@ -91,17 +90,17 @@ def send_message(event_class, time, name, thread_id, type, event, file, line, fr
     cmdTextList = ['<xml>']
 
     cmdTextList.append('<' + event_class)
-    cmdTextList.append(' time="%s"' % pydevd_vars.make_valid_xml_value(str(time)))
-    cmdTextList.append(' name="%s"' % pydevd_vars.make_valid_xml_value(name))
-    cmdTextList.append(' thread_id="%s"' % pydevd_vars.make_valid_xml_value(thread_id))
-    cmdTextList.append(' type="%s"' % pydevd_vars.make_valid_xml_value(type))
+    cmdTextList.append(' time="%s"' % pydevd_xml.make_valid_xml_value(str(time)))
+    cmdTextList.append(' name="%s"' % pydevd_xml.make_valid_xml_value(name))
+    cmdTextList.append(' thread_id="%s"' % pydevd_xml.make_valid_xml_value(thread_id))
+    cmdTextList.append(' type="%s"' % pydevd_xml.make_valid_xml_value(type))
     if type == "lock":
-        cmdTextList.append(' lock_id="%s"' % pydevd_vars.make_valid_xml_value(str(lock_id)))
+        cmdTextList.append(' lock_id="%s"' % pydevd_xml.make_valid_xml_value(str(lock_id)))
     if parent is not None:
-        cmdTextList.append(' parent="%s"' % pydevd_vars.make_valid_xml_value(parent))
-    cmdTextList.append(' event="%s"' % pydevd_vars.make_valid_xml_value(event))
-    cmdTextList.append(' file="%s"' % pydevd_vars.make_valid_xml_value(file))
-    cmdTextList.append(' line="%s"' % pydevd_vars.make_valid_xml_value(str(line)))
+        cmdTextList.append(' parent="%s"' % pydevd_xml.make_valid_xml_value(parent))
+    cmdTextList.append(' event="%s"' % pydevd_xml.make_valid_xml_value(event))
+    cmdTextList.append(' file="%s"' % pydevd_xml.make_valid_xml_value(file))
+    cmdTextList.append(' line="%s"' % pydevd_xml.make_valid_xml_value(str(line)))
     cmdTextList.append('></' + event_class + '>')
 
     cmdTextList += get_text_list_for_frame(frame)