##// END OF EJS Templates
Fixes for py2.6
Jonathan Frederic -
Show More
@@ -19,6 +19,7 b' templates.'
19 import re
19 import re
20 import textwrap
20 import textwrap
21 from xml.etree import ElementTree
21 from xml.etree import ElementTree
22 from types import StringTypes
22
23
23 from IPython.utils import py3compat
24 from IPython.utils import py3compat
24
25
@@ -61,11 +62,7 b' def html_text(element):'
61
62
62 Analog of jQuery's $(element).text()
63 Analog of jQuery's $(element).text()
63 """
64 """
64 instance_element_tree = isinstance(ElementTree.ElementTree, type) and \
65 if isinstance(element, StringTypes):
65 isinstance(element, (ElementTree.ElementTree))
66 instance_element = isinstance(ElementTree.Element, type) and \
67 isinstance(element, (ElementTree.Element))
68 if not (instance_element or instance_element_tree):
69 element = ElementTree.fromstring(element)
66 element = ElementTree.fromstring(element)
70
67
71 text = element.text or ""
68 text = element.text or ""
@@ -18,6 +18,7 b' import subprocess'
18 import os
18 import os
19 import glob
19 import glob
20 import shutil
20 import shutil
21 import sys
21
22
22 import IPython
23 import IPython
23 from IPython.utils.tempdir import TemporaryDirectory
24 from IPython.utils.tempdir import TemporaryDirectory
@@ -166,5 +167,5 b' class TestsBase(object):'
166
167
167
168
168 def call(self, parameters):
169 def call(self, parameters):
169 return subprocess.check_output(parameters)
170 return subprocess.Popen(parameters, stdout=subprocess.PIPE).communicate()[0]
170 No newline at end of file
171
General Comments 0
You need to be logged in to leave comments. Login now