From cc224c6d7d1bad06b11667d333bcac83f9f8b3d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Fr=C3=B6ssman?= Date: Fri, 24 Apr 2015 13:28:03 +0200 Subject: [PATCH] Fix lint tool suggestions --- exitwp.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exitwp.py b/exitwp.py index 097a89b..1c4ef3f 100755 --- a/exitwp.py +++ b/exitwp.py @@ -99,7 +99,7 @@ def parse_items(): taxanomies = i.findall('category') export_taxanomies = {} for tax in taxanomies: - if not "domain" in tax.attrib: + if "domain" not in tax.attrib: continue t_domain = unicode(tax.attrib['domain']) t_entry = unicode(tax.text) @@ -107,7 +107,7 @@ def parse_items(): and not (t_domain in taxonomy_entry_filter and taxonomy_entry_filter[t_domain] == t_entry)): - if not t_domain in export_taxanomies: + if t_domain not in export_taxanomies: export_taxanomies[t_domain] = [] export_taxanomies[t_domain].append(t_entry) @@ -143,7 +143,7 @@ def gi(q, unicode_wrap=True, empty=False): img_srcs.append(img['src']) except: print "could not parse html: " + body - #print img_srcs + # print img_srcs excerpt = gi('excerpt:encoded', empty=True) @@ -266,8 +266,8 @@ def get_attachment_path(src, dir, dir_prefix='images'): if (not os.path.exists(target_dir)): os.makedirs(target_dir) - #if src not in attachments[dir]: - ##print target_name + # if src not in attachments[dir]: + # print target_name return target_file for i in data['items']: