Commits

ZyX_I committed 44f5ddc

@%aurum/drivers/common/utils: Made python version of readsystem write stderr to vim.stderr

  • Participants
  • Parent commits 99f5241

Comments (0)

Files changed (1)

File python/aurum/utils.py

 # XXX This should throw an exception if it is unusable
 from subprocess import Popen, PIPE
+from sys import stderr
 def readsystem(cmd, cwd=None):
     if not cwd:
         cwd=None
-    p=Popen(cmd, shell=False, stdout=PIPE, cwd=cwd)
+    p=Popen(cmd, shell=False, stdout=PIPE, stderr=PIPE, cwd=cwd)
     lines=[]
     lastnl=False
     for line in p.stdout:
     if lastnl:
         lines.append('')
     exit_code=p.poll()
+    stderr.write(p.stderr.read())
     return lines, exit_code
 # vim: ft=python ts=4 sw=4 sts=4 et tw=100