diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-07-01 20:36:56 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-07-01 20:36:56 +0000 |
| commit | 262d6a5f53e1ecfdcf7f605e011b9985fcd62822 (patch) | |
| tree | 87e5a565359422671cb904be44286d128e29fb91 /openstack/common/rootwrap/wrapper.py | |
| parent | fb50f51f06b7429e8ca1f6247713e9fed0ee7bc2 (diff) | |
| parent | 233baa20f5f7c83c20c410da10861ea0fa6a0307 (diff) | |
| download | oslo-262d6a5f53e1ecfdcf7f605e011b9985fcd62822.tar.gz oslo-262d6a5f53e1ecfdcf7f605e011b9985fcd62822.tar.xz oslo-262d6a5f53e1ecfdcf7f605e011b9985fcd62822.zip | |
Merge "Handle empty PATH environment variable"
Diffstat (limited to 'openstack/common/rootwrap/wrapper.py')
| -rw-r--r-- | openstack/common/rootwrap/wrapper.py | 4 |
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"): |
