diff --git a/Headphones.py b/Headphones.py index e457a2e5..f8053ff4 100755 --- a/Headphones.py +++ b/Headphones.py @@ -98,7 +98,6 @@ def main(): # Start the background threads headphones.start() - return diff --git a/headphones/__init__.py b/headphones/__init__.py index cff12df6..8bd2afa7 100644 --- a/headphones/__init__.py +++ b/headphones/__init__.py @@ -1,3 +1,5 @@ +from __future__ import with_statement + import os, sys, subprocess import threading @@ -361,7 +363,6 @@ def start(): # Check for new versions versioncheck.checkGithub() - started = True def dbcheck(): @@ -395,13 +396,9 @@ def shutdown(restart=False, update=False): popen_list = [sys.executable, FULL_PATH] popen_list += ARGS - #if '--nolaunch' not in popen_list: - # popen_list += ['--nolaunch'] + if '--nolaunch' not in popen_list: + popen_list += ['--nolaunch'] logger.info('Restarting Headphones with ' + str(popen_list)) subprocess.Popen(popen_list, cwd=os.getcwd()) - os._exit(0) - -def refresh(): - - raise cherrypy.HTTPRedirect("home") \ No newline at end of file + os._exit(0) \ No newline at end of file diff --git a/headphones/webserve.py b/headphones/webserve.py index c7c5ff3f..9702baae 100644 --- a/headphones/webserve.py +++ b/headphones/webserve.py @@ -10,7 +10,7 @@ import string import time import datetime import sqlite3 -from threading import Thread +import threading import headphones from headphones.mb import getReleaseGroup @@ -26,7 +26,7 @@ class WebInterface(object): def home(self): page = [templates._header] - if not headphones.LATEST_VERSION: + if not headphones.CURRENT_VERSION: page.append('''
''') elif headphones.CURRENT_VERSION != headphones.LATEST_VERSION and headphones.INSTALL_TYPE != 'win': page.append('''