diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-01-17 12:35:45 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-01-17 12:35:45 -0500 |
commit | 1a1da7c11e8bbb7e9f4b06a06ee5d6b18fdc1efc (patch) | |
tree | 2aaa1e47949d588bc11f05d2c139ca98b51d0ca5 /cloudinit/UserDataHandler.py | |
parent | c33eedb47b2b22c797051da197fd80e74f1db179 (diff) | |
download | vyos-cloud-init-1a1da7c11e8bbb7e9f4b06a06ee5d6b18fdc1efc.tar.gz vyos-cloud-init-1a1da7c11e8bbb7e9f4b06a06ee5d6b18fdc1efc.zip |
[PATCH 3/4] Fix pylint conventions C0324 (comma not followed by a space)
From: Juerg Haefliger <juerg.haefliger@hp.com>
Diffstat (limited to 'cloudinit/UserDataHandler.py')
-rw-r--r-- | cloudinit/UserDataHandler.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cloudinit/UserDataHandler.py b/cloudinit/UserDataHandler.py index b21eacbe..6372dc09 100644 --- a/cloudinit/UserDataHandler.py +++ b/cloudinit/UserDataHandler.py @@ -42,7 +42,7 @@ def decomp_str(string): import StringIO import gzip try: - uncomp = gzip.GzipFile(None,"rb",1,StringIO.StringIO(string)).read() + uncomp = gzip.GzipFile(None, "rb", 1, StringIO.StringIO(string)).read() return(uncomp) except: return(string) @@ -94,7 +94,7 @@ def explode_cc_archive(archive, appendmsg): # scalar(payload) def_type = "text/cloud-config" - if isinstance(ent,str): + if isinstance(ent, str): ent = { 'content': ent } content = ent.get('content', '') @@ -118,7 +118,7 @@ def explode_cc_archive(archive, appendmsg): continue msg.add_header(header, ent['header']) - _attach_part(appendmsg,msg) + _attach_part(appendmsg, msg) def multi_part_count(outermsg, newcount=None): @@ -195,13 +195,13 @@ def message_from_string(data, headers=None): headers = {} if "mime-version:" in data[0:4096].lower(): msg = email.message_from_string(data) - for (key,val) in headers.items(): + for (key, val) in headers.items(): if key in msg: - msg.replace_header(key,val) + msg.replace_header(key, val) else: msg[key] = val else: - mtype = headers.get("Content-Type","text/plain") + mtype = headers.get("Content-Type", "text/plain") maintype, subtype = mtype.split("/", 1) msg = MIMEBase(maintype, subtype, *headers) msg.set_payload(data) |