(cmd, args='')
| 44 | |
| 45 | |
| 46 | def read_process(cmd, args=''): |
| 47 | pipein, pipeout = os.popen4('%s %s' % (cmd, args)) |
| 48 | try: |
| 49 | firstline = pipeout.readline() |
| 50 | if (re.search(r'(not recognized|No such file|not found)', firstline, |
| 51 | re.IGNORECASE)): |
| 52 | raise IOError('%s must be on your system path.' % cmd) |
| 53 | output = firstline + pipeout.read() |
| 54 | finally: |
| 55 | pipeout.close() |
| 56 | return output |
| 57 | |
| 58 | |
| 59 | APACHE_PATH = 'apache2ctl' |
no test coverage detected
searching dependent graphs…