Example #1
0
 def popen_output(self, args, cwd=None, report=True):
     if isinstance(args, str):
         args = std.shlex.split(args)
     assert args[0], args
     args = [str(x) for x in args]
     if cwd == None:
         cwd = self.cwd
     if report:
         self.report_popen(args, cwd)
     return check_output(args, cwd=str(cwd))
Example #2
0
 def popen_output(self, args, cwd=None, report=True):
     if isinstance(args, str):
         args = std.shlex.split(args)
     assert args[0], args
     args = [str(x) for x in args]
     if cwd == None:
         cwd = self.cwd
     if report:
         self.report_popen(args, cwd)
     return check_output(args, cwd=str(cwd))
Example #3
0
File: main.py Project: vartec/devpi
 def popen_output(self, args, cwd=None, report=True):
     if isinstance(args, str):
         args = std.shlex.split(args)
     assert args[0], args
     args = [str(x) for x in args]
     if cwd == None:
         cwd = self.cwd
     cmd = py.path.local.sysfind(args[0])
     if not cmd:
         self.fatal("command not found: %s" % args[0])
     args[0] = str(cmd)
     if report:
         self.report_popen(args, cwd)
     return check_output(args, cwd=str(cwd))
Example #4
0
def test_checkoutput_error(hg):
    with pytest.raises(CalledProcessError):
        check_output([hg, "qlwkje"])
Example #5
0
def test_check_output(hg):
    assert check_output([hg, "--version"])
Example #6
0
 def check_output(self, args):
     args = self._getargs(args)
     self.tw.line("$ %s [captured]" % " ".join(args))
     return check_output(args)
Example #7
0
 def check_output(self, args):
     args = self._getargs(args)
     self.tw.line("$ %s [captured]" % " ".join(args))
     return check_output(args)