Skip to content

Commit 5c98ad5

Browse files
committed
tests: Remove < 2.7 compat code
1 parent 3250099 commit 5c98ad5

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

examples/tests/backend_driver.py

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

340340

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

355352

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

0 commit comments

Comments
 (0)