(command,
universal_newlines = True,
useshell = USE_SHELL,
env = os.environ)
| 101 | return -1 |
| 102 | |
| 103 | def RunWithRetuncode(command, |
| 104 | universal_newlines = True, |
| 105 | useshell = USE_SHELL, |
| 106 | env = os.environ): |
| 107 | try: |
| 108 | p = subprocess.Popen(command, stdout = subprocess.PIPE, stderr = subprocess.PIPE, shell = useshell, universal_newlines = universal_newlines, env = env ) |
| 109 | output = p.stdout.read() |
| 110 | p.wait() |
| 111 | errout = p.stderr.read() |
| 112 | p.stdout.close() |
| 113 | p.stderr.close() |
| 114 | return p.returncode,output,errout |
| 115 | except Exception,ex: |
| 116 | print(ex) |
| 117 | return -1,None,None |
| 118 | |
| 119 | def GetTables(output): |
| 120 | # name tid pid endpoint role ttl is_alive compress_type |
no test coverage detected