summaryrefslogtreecommitdiffstats
path: root/openstack/common/rootwrap/wrapper.py
diff options
context:
space:
mode:
Diffstat (limited to 'openstack/common/rootwrap/wrapper.py')
-rw-r--r--openstack/common/rootwrap/wrapper.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/openstack/common/rootwrap/wrapper.py b/openstack/common/rootwrap/wrapper.py
index df1a9f4..6bd829e 100644
--- a/openstack/common/rootwrap/wrapper.py
+++ b/openstack/common/rootwrap/wrapper.py
@@ -46,8 +46,10 @@ class RootwrapConfig(object):
if config.has_option("DEFAULT", "exec_dirs"):
self.exec_dirs = config.get("DEFAULT", "exec_dirs").split(",")
else:
+ self.exec_dirs = []
# Use system PATH if exec_dirs is not specified
- self.exec_dirs = os.environ["PATH"].split(':')
+ if "PATH" in os.environ:
+ self.exec_dirs = os.environ['PATH'].split(':')
# syslog_log_facility
if config.has_option("DEFAULT", "syslog_log_facility"):