diff options
author | Joshua Harlow <harlowja@gmail.com> | 2016-05-24 13:48:50 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@gmail.com> | 2016-05-24 13:48:50 -0700 |
commit | 85a53d66ad0241b2d6453d902487bb2edc1512b8 (patch) | |
tree | f52cff059de9fdb0aab88ba3ecba3dc2f0badced /cloudinit/net/__init__.py | |
parent | ef47b4f4c14ffe1337508f85f365b338a048a5a1 (diff) | |
download | vyos-cloud-init-85a53d66ad0241b2d6453d902487bb2edc1512b8.tar.gz vyos-cloud-init-85a53d66ad0241b2d6453d902487bb2edc1512b8.zip |
Fix up some of the net usage and restore imports and add a mini compat module
Diffstat (limited to 'cloudinit/net/__init__.py')
-rw-r--r-- | cloudinit/net/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cloudinit/net/__init__.py b/cloudinit/net/__init__.py index 776af0d3..f8df58f0 100644 --- a/cloudinit/net/__init__.py +++ b/cloudinit/net/__init__.py @@ -20,7 +20,8 @@ import errno import logging import os -import six +from .import compat + import yaml LOG = logging.getLogger(__name__) @@ -55,7 +56,7 @@ def write_file(path, content): if not os.path.isdir(base_path): os.makedirs(base_path) with open(path, "wb+") as fh: - if isinstance(content, six.text_type): + if isinstance(content, compat.text_type): content = content.encode("utf8") fh.write(content) |