Shutdown the logger before restarting CPS. Fixes issue #587

This commit is contained in:
mano3m
2012-07-15 19:09:48 +02:00
parent 897a7ea122
commit 64c044acc1

View File

@@ -9,7 +9,7 @@ import socket
import subprocess
import sys
import traceback
import time
# Root path
base_path = dirname(os.path.abspath(__file__))
@@ -96,6 +96,10 @@ class Loader(object):
except:
self.log.critical(traceback.format_exc())
# Release log files and shutdown logger
logging.shutdown()
time.sleep(3)
args = [sys.executable] + [os.path.join(base_path, __file__)] + sys.argv[1:]
subprocess.Popen(args)
except: