mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 01:21:38 -05:00
Handle error properly in show_sys_info
This commit is contained in:
parent
77abf26bfd
commit
02d6d8ece6
1 changed files with 11 additions and 6 deletions
17
testein.py
17
testein.py
|
@ -113,13 +113,18 @@ class TestRunner(object):
|
|||
command.extend(['--eval', "(ert 't)"])
|
||||
return command
|
||||
|
||||
def show_sys_info(self, command):
|
||||
from subprocess import Popen
|
||||
def show_sys_info(self, base_command):
|
||||
from subprocess import Popen, PIPE
|
||||
print "*" * 50
|
||||
with open(os.devnull, 'w') as devnull:
|
||||
Popen(
|
||||
command + ['-f', 'ein:dev-print-sys-info'],
|
||||
stderr=devnull).wait()
|
||||
command = base_command + ['-f', 'ein:dev-print-sys-info']
|
||||
proc = Popen(command, stderr=PIPE)
|
||||
err = proc.stderr.read()
|
||||
proc.wait()
|
||||
if proc.returncode != 0:
|
||||
print "Error with return code {0} while running {1}".format(
|
||||
proc.returncode, command)
|
||||
print err
|
||||
pass
|
||||
print "*" * 50
|
||||
|
||||
def need_ert(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue