From 4ae91fa17a31cddd072f7e007f10e37f67871c6e Mon Sep 17 00:00:00 2001 From: Ruud Date: Thu, 19 Apr 2012 22:18:10 +0200 Subject: [PATCH] Just print error when loader didn't finish --- CouchPotato.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CouchPotato.py b/CouchPotato.py index 57f6461..6c3a8de 100755 --- a/CouchPotato.py +++ b/CouchPotato.py @@ -114,6 +114,7 @@ class Loader(object): if __name__ == '__main__': + l = None try: l = Loader() l.daemonize() @@ -135,7 +136,10 @@ if __name__ == '__main__': try: # if this fails we will have two tracebacks # one for failing to log, and one for the exception that got us here. - l.log.critical(traceback.format_exc()) + if l: + l.log.critical(traceback.format_exc()) + else: + print traceback.format_exc() except: print traceback.format_exc() - raise \ No newline at end of file + raise