diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-09-20 14:02:34 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-09-20 14:02:34 -0700 |
commit | 4b910d7bca47cb4fd26394fb4d14ebc72b1a73f8 (patch) | |
tree | 45f1efcde1c81afc3c173b369926bf687a1224c4 /cloudinit/util.py | |
parent | 94b9647e4df742982cac8a2c2925fb4894281dbf (diff) | |
download | vyos-cloud-init-4b910d7bca47cb4fd26394fb4d14ebc72b1a73f8.tar.gz vyos-cloud-init-4b910d7bca47cb4fd26394fb4d14ebc72b1a73f8.zip |
Add a resolv.conf parser that can be easily
used for adjusting a resolv.conf formatted
file and use this to adjust the resolv.conf
in the redhat distro instead of replacing
the previous resolv.conf completely.
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r-- | cloudinit/util.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py index 33da73eb..e5fa42c6 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -952,6 +952,16 @@ def find_devs_with(criteria=None, oformat='device', return entries +def uniq_list(in_list): + out_list = [] + for i in in_list: + if i in out_list: + continue + else: + out_list.append(i) + return out_list + + def load_file(fname, read_cb=None, quiet=False): LOG.debug("Reading from %s (quiet=%s)", fname, quiet) ofh = StringIO() |