diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-10-05 22:56:30 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-10-05 22:56:30 +0200 |
commit | 938c31f3462679a76060017ac6ed0b9ad8f18b65 (patch) | |
tree | 3833a5def0c290ebbf94f7dee0ed5184d7dfeeca /modules | |
parent | ab30d49729d231ad593d146bdfdcd68cc269a04e (diff) |
tracking: Ignore NoPackgeFound errors in update_consignment().
Diffstat (limited to 'modules')
-rw-r--r-- | modules/tracking.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/tracking.py b/modules/tracking.py index 8995fdf..0f3ae22 100644 --- a/modules/tracking.py +++ b/modules/tracking.py @@ -364,7 +364,11 @@ class Module: target = target.encode('utf-8') removed = False tm = tracking_modules[consignment.type]() - package_results = tm.track(consignment.code) or [] + try: + package_results = tm.track(consignment.code) or [] + except NoPackageFound as e: + # ignore + return for data in package_results: try: package = session.query(Package).filter(and_(Package.consignment_id == consignment.id, Package.code == data.code)).one() |