Skip to content

Commit

Permalink
Fix processutils.execute errors on windows
Browse files Browse the repository at this point in the history
Added a check for existence of geteuid.

This fix is related to oslo-incubator commit:
d6a963e911b8456c06dceb5ee3cc88a70c08bf82

Closes-Bug: #1209410

Change-Id: Ibaa1f061bf161768890d4708dc945180121726f9
  • Loading branch information
Matt Riedemann committed Sep 28, 2013
1 parent 63c9d87 commit 5fc059f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nova/openstack/common/processutils.py
Expand Up @@ -132,7 +132,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 '
Expand Down

0 comments on commit 5fc059f

Please sign in to comment.