summaryrefslogtreecommitdiff
path: root/cloudinit/util.py
diff options
context:
space:
mode:
authorBen Howard <ben.howard@canonical.com>2013-07-23 16:33:46 -0600
committerBen Howard <ben.howard@canonical.com>2013-07-23 16:33:46 -0600
commit4b41f7dc3d37d5bf7397bbc34d8a5e0c56798ac7 (patch)
tree1bc5f03ef6417ec13a4a51493036351904e5da03 /cloudinit/util.py
parentc67cc904bfddc9ed462f54d85d31236b39b6285f (diff)
downloadvyos-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.py5
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: