(cmd, data=None)
| 15 | mypath = '.' |
| 16 | |
| 17 | def runCmd(cmd, data=None): |
| 18 | if input is None: |
| 19 | p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
| 20 | stdout, stderr = p.communicate() |
| 21 | else: |
| 22 | p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
| 23 | stdout, stderr = p.communicate(input=data) |
| 24 | |
| 25 | return stdout.decode('utf-8'), stderr.decode('utf-8'), p.returncode |
| 26 | #------------------------------------------------------------------------------ |
| 27 | |
| 28 | def cleanStderr(stderr, fileName=None): |
no outgoing calls
no test coverage detected