From 6a2031c4dc005d9a0f42b10200b828eee5cf166f Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Thu, 12 Jan 2012 16:54:54 +0100 Subject: [PATCH 06/13] Fix pylint warnings W0612 (unused variable) From: Juerg Haefliger --- cloudinit/UserDataHandler.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cloudinit/UserDataHandler.py') diff --git a/cloudinit/UserDataHandler.py b/cloudinit/UserDataHandler.py index ac2cdda9..0afe5a18 100644 --- a/cloudinit/UserDataHandler.py +++ b/cloudinit/UserDataHandler.py @@ -77,7 +77,7 @@ def do_include(content, appendmsg): content = urllib.urlopen(line).read() if includeonce: util.write_file(includeonce_filename, content, mode=0600) - except Exception as e: + except Exception: raise process_includes(message_from_string(decomp_str(content)), appendmsg) @@ -190,7 +190,6 @@ def process_includes(msg, appendmsg=None): def message_from_string(data, headers={}): if "mime-version:" in data[0:4096].lower(): - was_mime = True msg = email.message_from_string(data) for (key,val) in headers.items(): if key in msg: @@ -198,7 +197,6 @@ def message_from_string(data, headers={}): else: msg[key] = val else: - was_mime = False mtype = headers.get("Content-Type","text/plain") maintype, subtype = mtype.split("/", 1) msg = MIMEBase(maintype, subtype, *headers) -- cgit v1.2.3