From 2295a854ee4fc5ca3295090b763cf853cf2e6d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 10 Oct 2009 13:44:21 +0200 Subject: [PATCH] Set cwd when testing import of module --- trytond/monitor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/trytond/monitor.py b/trytond/monitor.py index 6ba2f41248..f42072eb40 100644 --- a/trytond/monitor.py +++ b/trytond/monitor.py @@ -51,7 +51,9 @@ def monitor(): if os.path.splitext(path)[1] in ['.pyc', '.pyo', '.pyd']: path = path[:-1] if _modified(path): - if subprocess.call((sys.executable, '-c', 'import %s' % module)): + if subprocess.call((sys.executable, '-c', 'import %s' % module), + cwd=os.path.dirname(os.path.abspath(os.path.normpath( + os.path.join(__file__, '..'))))): modified = False break modified = True