changed logging
This commit is contained in:
parent
d7eb2aed7f
commit
525c65edea
2 changed files with 4 additions and 4 deletions
|
|
@ -25,7 +25,7 @@ class Command:
|
|||
'''
|
||||
try:
|
||||
self.commandStart = dt.now()
|
||||
self.log.d("calling command " + str(self.command) + " at " + str(self.commandStart))
|
||||
self.log.i("calling command " + str(self.command) + " at " + str(self.commandStart))
|
||||
#self.output=sp.check_output(self.command.split())
|
||||
process = Popen(self.command, stdout=sp.PIPE, stderr=sp.PIPE, shell=True)
|
||||
self.output, self.error = process.communicate()
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class JobInfo:
|
|||
self.jobs = []
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
return "JobInfo " + str(self.name)
|
||||
|
||||
def setLogger(self, log):
|
||||
self.log = log
|
||||
|
|
@ -49,8 +49,8 @@ class JobInfo:
|
|||
cmd=Command(hs.service.command, self.log)
|
||||
cmd.call()
|
||||
self.log.d(cmd.getAllOutput())
|
||||
except Error:
|
||||
self.log.d(Error)
|
||||
except Exception:
|
||||
self.log.d(Exception)
|
||||
|
||||
|
||||
#must find real service command stored in hosts...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue