diff options
-rw-r--r-- | cloudinit/util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py index ce8dacbe..77f9ab36 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -1850,7 +1850,7 @@ def which(program): if is_exe(program): return program else: - for path in os.environ["PATH"].split(os.pathsep): + for path in os.environ.get("PATH", "").split(os.pathsep): path = path.strip('"') exe_file = os.path.join(path, program) if is_exe(exe_file): |