fixed typos, imports; pep8
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
from Configuration import Configuration
|
|
||||||
from Color import Color
|
|
||||||
|
|
||||||
from subprocess import Popen, call, PIPE
|
|
||||||
import time
|
import time
|
||||||
|
from subprocess import Popen, PIPE
|
||||||
|
|
||||||
|
from Color import Color
|
||||||
|
from Configuration import Configuration
|
||||||
|
|
||||||
|
|
||||||
class Process(object):
|
class Process(object):
|
||||||
''' Represents a running/ran process '''
|
''' Represents a running/ran process '''
|
||||||
@@ -48,7 +49,7 @@ class Process(object):
|
|||||||
stdout = p.stdout().strip()
|
stdout = p.stdout().strip()
|
||||||
stderr = p.stderr().strip()
|
stderr = p.stderr().strip()
|
||||||
|
|
||||||
if stdout == '' and err == '':
|
if stdout == '' and stderr == '':
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
@@ -147,6 +148,7 @@ class Process(object):
|
|||||||
return
|
return
|
||||||
raise e # process cannot be killed
|
raise e # process cannot be killed
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
p = Process('ls')
|
p = Process('ls')
|
||||||
print p.stdout(), p.stderr()
|
print p.stdout(), p.stderr()
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class Wash(object):
|
|||||||
wash_name = 'wash'
|
wash_name = 'wash'
|
||||||
if not Process.exists(wash_name):
|
if not Process.exists(wash_name):
|
||||||
wash_name = 'walsh'
|
wash_name = 'walsh'
|
||||||
if not Proces.exists(wash_name):
|
if not Process.exists(wash_name):
|
||||||
# Wash isn't found, drop out
|
# Wash isn't found, drop out
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user