From 4d91b6a87c9fd6f8cc923d1bc375eb80db5dbec3 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 29 Nov 2012 16:17:46 +0100 Subject: [PATCH] [FIX] osutils: missing import bzr revid: chs@openerp.com-20121129151746-r7t5xgddekvoq23w --- openerp/tools/osutil.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openerp/tools/osutil.py b/openerp/tools/osutil.py index 2f72e099f7f..622679cc63e 100644 --- a/openerp/tools/osutil.py +++ b/openerp/tools/osutil.py @@ -29,6 +29,7 @@ from os.path import join as opj if os.name == 'nt': import ctypes import win32service as ws + import win32serviceutil as wsu def listdir(dir, recursive=False): @@ -111,7 +112,7 @@ else: ws.CloseServiceHandle(srv) with close_srv(ws.OpenSCManager(None, None, ws.SC_MANAGER_ALL_ACCESS)) as hscm: - with close_srv(ws.SmartOpenService(hscm, nt_service_name, ws.SERVICE_ALL_ACCESS)) as hs: + with close_srv(wsu.SmartOpenService(hscm, nt_service_name, ws.SERVICE_ALL_ACCESS)) as hs: info = ws.QueryServiceStatusEx(hs) return info.ProcessId == getppid()