From 1dc576965a4728103cf19a41c9684116bae85f17 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Wed, 20 Jul 2016 08:24:36 +0200 Subject: [PATCH] Import traceback only on exception --- resources/lib/plexbmchelper/listener.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/plexbmchelper/listener.py b/resources/lib/plexbmchelper/listener.py index 198d4cd2..fae832fc 100644 --- a/resources/lib/plexbmchelper/listener.py +++ b/resources/lib/plexbmchelper/listener.py @@ -1,5 +1,4 @@ import re -import traceback from SocketServer import ThreadingMixIn from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler from urlparse import urlparse, parse_qs @@ -247,6 +246,7 @@ class MyHandler(BaseHTTPRequestHandler): except: self.logMsg('Error encountered. Traceback:', -1) + import traceback self.logMsg(traceback.print_exc(), -1)