From 5bac47ae22ff1dd1e9f1ec8617f723475281188b Mon Sep 17 00:00:00 2001 From: Alessandro Pilotti Date: Wed, 25 Sep 2013 02:30:33 +0300 Subject: [PATCH] Fix processutils.execute errors on windows Added a check for existence of geteuid. This fix is related to oslo-incubator commit: d6a963e911b8456c06dceb5ee3cc88a70c08bf82 Fixes bug #1209410 Change-Id: Idd716a2104ba3fa24610825ce4bf9c8e2c6d490b --- cinder/openstack/common/processutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cinder/openstack/common/processutils.py b/cinder/openstack/common/processutils.py index dd6e73122..059f570b1 100644 --- a/cinder/openstack/common/processutils.py +++ b/cinder/openstack/common/processutils.py @@ -127,7 +127,7 @@ def execute(*cmd, **kwargs): raise UnknownArgumentError(_('Got unknown keyword args ' 'to utils.execute: %r') % kwargs) - if run_as_root and os.geteuid() != 0: + if run_as_root and hasattr(os, 'geteuid') and os.geteuid() != 0: if not root_helper: raise NoRootWrapSpecified( message=('Command requested root, but did not specify a root ' -- 2.45.2