diff options
author | Ben Howard <ben.howard@canonical.com> | 2013-07-23 16:33:46 -0600 |
---|---|---|
committer | Ben Howard <ben.howard@canonical.com> | 2013-07-23 16:33:46 -0600 |
commit | 4b41f7dc3d37d5bf7397bbc34d8a5e0c56798ac7 (patch) | |
tree | 1bc5f03ef6417ec13a4a51493036351904e5da03 /cloudinit/util.py | |
parent | c67cc904bfddc9ed462f54d85d31236b39b6285f (diff) | |
download | vyos-cloud-init-4b41f7dc3d37d5bf7397bbc34d8a5e0c56798ac7.tar.gz vyos-cloud-init-4b41f7dc3d37d5bf7397bbc34d8a5e0c56798ac7.zip |
Changed get_serial to be fully parameterized and return the serial
initialized.
Added a mapping of attributes between cloud-init and smartos.
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r-- | cloudinit/util.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py index 7163225f..a2fbc004 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -1744,13 +1744,14 @@ def get_mount_info(path, log=LOG): lines = load_file(mountinfo_path).splitlines() return parse_mount_info(path, lines, log) + def which(program): # Return path of program for execution if found in path def is_exe(fpath): return os.path.isfile(fpath) and os.access(fpath, os.X_OK) - fpath, fname = os.path.split(program) - if fpath: + _fpath, _ = os.path.split(program) + if _fpath: if is_exe(program): return program else: |