some cleanup and generic buffer piping
--HG-- branch : pmacs2
This commit is contained in:
parent
572ab4f84f
commit
d2334621ee
|
@ -21,14 +21,13 @@ class Exec(Method):
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if bufname is None:
|
if bufname is None: bufname = '*%s*' % self.name.title()
|
||||||
bufname = '*%s*' % self.name.title()
|
if cmdname is None: cmdname = cmd.split(None, 1)[0]
|
||||||
if cmdname is None:
|
|
||||||
cmdname = cmd.split(None, 1)[0]
|
p = Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT)
|
||||||
p = Popen(cmd, shell=True, stdout=PIPE, stderr=STDOUT)
|
output = p.stdout.read()
|
||||||
output = p.stdout.read()
|
result = p.wait()
|
||||||
result = p.wait()
|
status = os.WEXITSTATUS(result)
|
||||||
status = os.WEXITSTATUS(result)
|
|
||||||
|
|
||||||
if not os.WIFEXITED(result):
|
if not os.WIFEXITED(result):
|
||||||
err = True
|
err = True
|
||||||
|
|
Loading…
Reference in New Issue