some cleanup and generic buffer piping

--HG--
branch : pmacs2
This commit is contained in:
moculus 2008-11-14 04:44:41 +00:00
parent 572ab4f84f
commit d2334621ee
1 changed files with 7 additions and 8 deletions

View File

@ -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