fixed winservice, thanks Marin Prajic

This commit is contained in:
mdipierro
2012-07-25 18:34:53 -05:00
parent b32f3aae16
commit 46829e95ad
4 changed files with 187 additions and 180 deletions
+3 -1
View File
@@ -92,7 +92,9 @@ class Web2pyService(Service):
_winreg.CloseKey(h)
dir = os.path.dirname(cls)
os.chdir(dir)
from gluon.settings import global_settings
global_settings.gluon_parent = dir
from gluon.custom_import import custom_import_install
custom_import_install(dir)
return True
except:
@@ -151,7 +153,7 @@ class Web2pyService(Service):
def web2py_windows_service_handler(argv=None, opt_file='options'):
path = os.path.dirname(__file__)
web2py_path = iup(path)
web2py_path = up(path)
os.chdir(web2py_path)
classstring = os.path.normpath(
os.path.join(web2py_path,'gluon.winservice.Web2pyService'))