Skip to content

Commit

Permalink
Fix for "ValueError: Attempted relative import in non-package" - In w…
Browse files Browse the repository at this point in the history
…indows system
  • Loading branch information
fazalsulaiman committed Aug 13, 2020
1 parent 2662850 commit d05c5ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions news/42.bugfix
@@ -0,0 +1 @@
fix for "ValueError: Attempted relative import in non-package" - In windows build
4 changes: 2 additions & 2 deletions src/plone/recipe/zeoserver/runzeo.bat
Expand Up @@ -3,5 +3,5 @@
@set ZODB_HOME=%(zodb3_home)s
@set CONFIG_FILE=%(INSTANCE_HOME)s/etc/%(PACKAGE)s.conf
@set PYTHONPATH=%(PYTHONPATH)s
@set RUNZEO=%%ZODB_HOME%%/ZEO/runzeo.py
"%%PYTHON%%" "%%RUNZEO%%" -C "%%CONFIG_FILE%%" %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9
@set RUNZEO=ZEO.runzeo
"%%PYTHON%%" -m "%%RUNZEO%%" -C "%%CONFIG_FILE%%" %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9
4 changes: 2 additions & 2 deletions src/plone/recipe/zeoserver/zeoservice.py.in
Expand Up @@ -74,7 +74,7 @@ ZODB_HOME = r'%(zodb_home)s'
PYTHONPATH = r'%(PYTHONPATH)s'
PID_FILENAME = r'%(PID_FILENAME)s'

ZEO_RUN = r'%%s\\ZEO\\runzeo.py' %% ZODB_HOME
ZEO_RUN = r'ZEO.runzeo'
CONFIG_FILE= os.path.join(INSTANCE_HOME, 'etc', 'zeo.conf')

import win32service
Expand Down Expand Up @@ -105,7 +105,7 @@ class InstanceService(Service):
_exe_name_ = PYTHONSERVICE_EXE

process_runner = PYTHON
process_args = '"%%s" -C "%%s"' %% (ZEO_RUN, CONFIG_FILE)
process_args = '-m "%%s" -C "%%s"' %% (ZEO_RUN, CONFIG_FILE)
def __init__(self, args):
self.setReg('command', self.process_runner + " " + self.process_args)
self.setReg('pid_filename', PID_FILENAME)
Expand Down

0 comments on commit d05c5ee

Please sign in to comment.