From 4676c2b7b164b00ad2ecfaa227875e3f71897fe9 Mon Sep 17 00:00:00 2001 From: echel0n Date: Sun, 15 Jun 2014 15:07:27 -0700 Subject: [PATCH] Testing update/restart fix --- sickbeard/__init__.py | 16 ++++++++-------- sickbeard/webserveInit.py | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py index 1280dd81..863cf05d 100644 --- a/sickbeard/__init__.py +++ b/sickbeard/__init__.py @@ -1293,14 +1293,14 @@ def saveAll(): save_config() def saveAndShutdown(restart=False): - - logger.log('Shutting down tornado') - try: - IOLoop.current().stop() - except RuntimeError: - pass - except: - logger.log('Failed shutting down the server: %s' % traceback.format_exc(), logger.ERROR) + if not restart: + logger.log('Shutting down tornado') + try: + IOLoop.current().stop() + except RuntimeError: + pass + except: + logger.log('Failed shutting down the server: %s' % traceback.format_exc(), logger.ERROR) halt() saveAll() diff --git a/sickbeard/webserveInit.py b/sickbeard/webserveInit.py index acc66c03..48281f6a 100644 --- a/sickbeard/webserveInit.py +++ b/sickbeard/webserveInit.py @@ -95,6 +95,7 @@ def initWebServer(options={}): app = Application([], debug=False, gzip=True, + autoreload=True, cookie_secret='61oETzKXQAGaYdkL5gEmGeJJFuYh7EQnp2XdTP1o/Vo=', login_url='/login' )