summaryrefslogtreecommitdiff
path: root/cloudinit/config
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2015-01-26 12:41:04 -0500
committerBarry Warsaw <barry@python.org>2015-01-26 12:41:04 -0500
commit926a3df79a10ede61967c60f48ff0670a36e689a (patch)
treec43e2abc22d088ab7a19bb968c9392ebe5a110d3 /cloudinit/config
parente085d5cec212757e0ffffaa1be470e315142a2aa (diff)
downloadvyos-cloud-init-926a3df79a10ede61967c60f48ff0670a36e689a.tar.gz
vyos-cloud-init-926a3df79a10ede61967c60f48ff0670a36e689a.zip
More Python 3 test fixes.
Diffstat (limited to 'cloudinit/config')
-rw-r--r--cloudinit/config/cc_write_files.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/cloudinit/config/cc_write_files.py b/cloudinit/config/cc_write_files.py
index a73d6f4e..4b03ea91 100644
--- a/cloudinit/config/cc_write_files.py
+++ b/cloudinit/config/cc_write_files.py
@@ -18,6 +18,7 @@
import base64
import os
+import six
from cloudinit.settings import PER_INSTANCE
from cloudinit import util
@@ -25,7 +26,7 @@ from cloudinit import util
frequency = PER_INSTANCE
DEFAULT_OWNER = "root:root"
-DEFAULT_PERMS = 0644
+DEFAULT_PERMS = 0o644
UNKNOWN_ENC = 'text/plain'
@@ -79,7 +80,7 @@ def write_files(name, files, log):
def decode_perms(perm, default, log):
try:
- if isinstance(perm, (int, long, float)):
+ if isinstance(perm, six.integer_types + (float,)):
# Just 'downcast' it (if a float)
return int(perm)
else: