another attempt to fix winservice issue

This commit is contained in:
mdipierro
2012-07-23 17:23:27 -05:00
parent 485d629fc2
commit 3a2fd8e6c8
2 changed files with 3 additions and 3 deletions

View File

@@ -1 +1 @@
Version 2.00.0 (2012-07-23 16:19:51) dev
Version 2.00.0 (2012-07-23 17:23:22) dev

View File

@@ -92,6 +92,8 @@ class Web2pyService(Service):
_winreg.CloseKey(h)
dir = os.path.dirname(cls)
os.chdir(dir)
global_settings.gluon_parent = dir
custom_import_install(dir)
return True
except:
self.log("Can't change to web2py working path; server is stopped")
@@ -151,8 +153,6 @@ def web2py_windows_service_handler(argv=None, opt_file='options'):
path = os.path.dirname(__file__)
web2py_path = iup(path)
os.chdir(web2py_path)
global_settings.gluon_parent = web2py_path
custom_import_install(web2py_path)
classstring = os.path.normpath(
os.path.join(web2py_path,'gluon.winservice.Web2pyService'))
if opt_file: