remove winservice support

This commit is contained in:
niphlod
2013-10-19 20:44:56 +02:00
parent dd8d9d9d8d
commit 9ea9f828bc
3 changed files with 1 additions and 275 deletions
-23
View File
@@ -822,12 +822,6 @@ def console():
default=None,
help=msg)
parser.add_option('-W',
'--winservice',
dest='winservice',
default='',
help='-W install|start|stop as Windows service')
msg = 'trigger a cron run manually; usually invoked from a system crontab'
parser.add_option('-C',
'--cron',
@@ -1144,23 +1138,6 @@ def start(cron=True):
pass
return
# ## if -W install/start/stop web2py as service
if options.winservice:
if os.name == 'nt':
try:
from winservice import register_service_handler, Web2pyService
register_service_handler(
argv=['', options.winservice],
opt_file=options.config,
cls=Web2pyService)
except ImportError:
print 'Error: Missing python module winservice'
sys.exit(1)
else:
print 'Error: Windows services not supported on this platform'
sys.exit(1)
return
# ## if -H cron is enabled in this *process*
# ## if --softcron use softcron
# ## use hardcron in all other cases