From 938c31f3462679a76060017ac6ed0b9ad8f18b65 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 5 Oct 2011 22:56:30 +0200 Subject: tracking: Ignore NoPackgeFound errors in update_consignment(). --- modules/tracking.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules') 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() -- cgit v1.2.3