catch missing winservice
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.00.1 (2012-08-29 10:05:45) rc4
|
Version 2.00.1 (2012-08-29 10:12:06) rc4
|
||||||
|
|||||||
+8
-3
@@ -33,8 +33,9 @@ try:
|
|||||||
import Tkinter, tkMessageBox
|
import Tkinter, tkMessageBox
|
||||||
import contrib.taskbar_widget
|
import contrib.taskbar_widget
|
||||||
from winservice import web2py_windows_service_handler
|
from winservice import web2py_windows_service_handler
|
||||||
|
have_winservice = True
|
||||||
except:
|
except:
|
||||||
pass
|
have_winservice = False
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -1080,8 +1081,12 @@ def start(cron=True):
|
|||||||
# ## if -W install/start/stop web2py as service
|
# ## if -W install/start/stop web2py as service
|
||||||
if options.winservice:
|
if options.winservice:
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
web2py_windows_service_handler(['', options.winservice],
|
if have_winservice:
|
||||||
options.config)
|
web2py_windows_service_handler(['', options.winservice],
|
||||||
|
options.config)
|
||||||
|
else:
|
||||||
|
print 'Error: Missing python module winservice'
|
||||||
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
print 'Error: Windows services not supported on this platform'
|
print 'Error: Windows services not supported on this platform'
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user