aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2014-01-03 01:24:49 +0100
committerMatěj Cepl <mcepl@redhat.com>2014-01-03 01:24:49 +0100
commitb33a83d94d6b69e6780244a09ebc975bc93ace5d (patch)
tree5498f83c078bfcf4359f64c1260c19ede1fdc3f2
parent6cd88bf84d51eef22b980f435044a9996df1ed1b (diff)
downloadgg_scraper-b33a83d94d6b69e6780244a09ebc975bc93ace5d.tar.gz
Skip over unfilled items in the unmangling config. file.
Fixes #281
-rwxr-xr-xgg_scrapper.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gg_scrapper.py b/gg_scrapper.py
index d50192a..f4d3263 100755
--- a/gg_scrapper.py
+++ b/gg_scrapper.py
@@ -277,6 +277,8 @@ def demangle(correct_list, orig_mbx, out_mbx):
if matches is not None:
u_from = msg.get_from()
for orig, fixed in pairs.items():
+ if (orig is not None) and (fixed is not None):
+ continue
msg_str = msg_str.replace(orig, fixed)
out_msg = mailbox.mboxMessage(msg_str)
out_msg.set_from(u_from)