From: Alessandro Pilotti Date: Tue, 24 Sep 2013 23:30:33 +0000 (+0300) Subject: Fix processutils.execute errors on windows X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=5bac47ae22ff1dd1e9f1ec8617f723475281188b;p=openstack-build%2Fcinder-build.git 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 --- 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 '