From 856fe0802df87ec386f3e45654964d3fb4e80554 Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Sat, 3 Aug 2013 22:05:15 +0200 Subject: [PATCH] chronopost: Do not set location to "None" if empty --- modules/chronopost/pages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/chronopost/pages.py b/modules/chronopost/pages.py index 1a8e7e37..5ee3d87d 100644 --- a/modules/chronopost/pages.py +++ b/modules/chronopost/pages.py @@ -50,7 +50,7 @@ class TrackPage(BasePage): continue ev = Event(i) - ev.location = unicode(tds[1].text) + ev.location = unicode(tds[1].text) if tds[1].text else None ev.activity = unicode(tds[1].find('br').tail) if tds[-1].text is not None: ev.activity += ', ' + self.parser.tocleanstring(tds[-1])