Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

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

Fixes LP# 1209410

Change-Id: I75a7343aa93761a7dcec3640245c7de945b9ce0a
  • Loading branch information
Davanum Srinivas authored and openstack-gerrit committed Aug 20, 2013
1 parent ebffe1c commit d6a963e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 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 d6a963e

Please sign in to comment.