summaryrefslogtreecommitdiff
path: root/src/daemon.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-04-06 19:52:59 +0200
committermathieui <mathieui@mathieui.net>2014-04-06 19:58:57 +0200
commite216fd2112c796bd625730f711861b7361f6fe9f (patch)
tree942239b0bf00dec0f9afd9e036a1bcedf449e6d3 /src/daemon.py
parent218c71dfbfb9f564eb1ec2a966df24eef2efbdec (diff)
downloadpoezio-e216fd2112c796bd625730f711861b7361f6fe9f.tar.gz
poezio-e216fd2112c796bd625730f711861b7361f6fe9f.tar.bz2
poezio-e216fd2112c796bd625730f711861b7361f6fe9f.tar.xz
poezio-e216fd2112c796bd625730f711861b7361f6fe9f.zip
Code cleanup
fixes whitespace issues, some builtin overrides, and some enormous lines might make poezio run nanoseconds faster!
Diffstat (limited to 'src/daemon.py')
-rwxr-xr-xsrc/daemon.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/daemon.py b/src/daemon.py
index 717dfd63..1b976282 100755
--- a/src/daemon.py
+++ b/src/daemon.py
@@ -50,22 +50,22 @@ class Executor(threading.Thread):
command.pop(-1)
def run(self):
- log.info('executing %s' % (self.command,))
+ log.debug('executing %s', self.command)
stdout = None
if self.filename:
try:
stdout = open(self.filename, self.redirection_mode)
- except (OSError, IOError) as e:
- log.error('Could not open redirection file: %s (%s)' % (self.filename, e,))
+ except (OSError, IOError):
+ log.error('Could not open redirection file: %s', self.filename, exc_info=True)
return
try:
subprocess.call(self.command, stdout=stdout)
except:
- import traceback
if self.remote:
+ import traceback
print(traceback.format_exc())
else:
- log.error('Could not execute %s:\n%s', self.command, traceback.format_exc())
+ log.error('Could not execute %s:', self.command, exc_info=True)
def main():
while True: