summaryrefslogtreecommitdiff
path: root/cloudinit/handlers
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2015-04-16 16:41:06 -0400
committerScott Moser <smoser@ubuntu.com>2015-04-16 16:41:06 -0400
commitdcd4b2b371059bd6249b4e43af371ee1162273e8 (patch)
tree2cd9c39717d9bf78169605391f5033e401fbc603 /cloudinit/handlers
parentf4789639af50ea631cf75af526ad013b05670caa (diff)
downloadvyos-cloud-init-dcd4b2b371059bd6249b4e43af371ee1162273e8.tar.gz
vyos-cloud-init-dcd4b2b371059bd6249b4e43af371ee1162273e8.zip
pep8 fixes
Diffstat (limited to 'cloudinit/handlers')
-rw-r--r--cloudinit/handlers/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cloudinit/handlers/__init__.py b/cloudinit/handlers/__init__.py
index d62fcd19..52defe66 100644
--- a/cloudinit/handlers/__init__.py
+++ b/cloudinit/handlers/__init__.py
@@ -170,12 +170,12 @@ def _extract_first_or_bytes(blob, size):
start = blob.split("\n", 1)[0]
else:
# We want to avoid decoding the whole blob (it might be huge)
- # By taking 4*size bytes we have a guarantee to decode size utf8 chars
- start = blob[:4*size].decode(errors='ignore').split("\n", 1)[0]
+ # By taking 4*size bytes we guarantee to decode size utf8 chars
+ start = blob[:4 * size].decode(errors='ignore').split("\n", 1)[0]
if len(start) >= size:
start = start[:size]
except UnicodeDecodeError:
- # Bytes array doesn't contain a text object -- return chunk of raw bytes
+ # Bytes array doesn't contain text so return chunk of raw bytes
start = blob[0:size]
return start