Skip to content

Commit 772fbc4

Browse files
committed
tests: Remove < 2.7 compat code
1 parent b09e79c commit 772fbc4

1 file changed

Lines changed: 10 additions & 13 deletions

File tree

examples/tests/backend_driver.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -337,19 +337,16 @@ def report_all_missing(directories):
337337
)
338338

339339

340-
try:
341-
import subprocess
342-
343-
def run(arglist):
344-
try:
345-
ret = subprocess.call(arglist)
346-
except KeyboardInterrupt:
347-
sys.exit()
348-
else:
349-
return ret
350-
except ImportError:
351-
def run(arglist):
352-
os.system(arglist)
340+
from matplotlib.compat import subprocess
341+
342+
343+
def run(arglist):
344+
try:
345+
ret = subprocess.call(arglist)
346+
except KeyboardInterrupt:
347+
sys.exit()
348+
else:
349+
return ret
353350

354351

355352
def drive(backend, directories, python=['python'], switches=[]):

0 commit comments

Comments
 (0)