diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-04-16 16:41:06 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-04-16 16:41:06 -0400 |
commit | dcd4b2b371059bd6249b4e43af371ee1162273e8 (patch) | |
tree | 2cd9c39717d9bf78169605391f5033e401fbc603 /cloudinit/handlers | |
parent | f4789639af50ea631cf75af526ad013b05670caa (diff) | |
download | vyos-cloud-init-dcd4b2b371059bd6249b4e43af371ee1162273e8.tar.gz vyos-cloud-init-dcd4b2b371059bd6249b4e43af371ee1162273e8.zip |
pep8 fixes
Diffstat (limited to 'cloudinit/handlers')
-rw-r--r-- | cloudinit/handlers/__init__.py | 6 |
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 |