From 6f1b58d6a5533699aee4ffaaf24ee5646c3dbf53 Mon Sep 17 00:00:00 2001 From: Florent Date: Mon, 22 Sep 2014 17:05:11 +0200 Subject: [PATCH] Catch parcelnotfound by untracking --- weboob/applications/parceloob/parceloob.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/weboob/applications/parceloob/parceloob.py b/weboob/applications/parceloob/parceloob.py index eb4229ae8f..7994f02ade 100644 --- a/weboob/applications/parceloob/parceloob.py +++ b/weboob/applications/parceloob/parceloob.py @@ -131,9 +131,13 @@ def do_untrack(self, line): pass if not removed: - parcel = self.get_object(line, 'get_parcel_tracking') + try: + parcel = self.get_object(line, 'get_parcel_tracking') + except ParcelNotFound: + parcel = False + if not parcel: - print >>self.stderr, 'Error: the parcel "%s" is not found' % line + print >>self.stderr, 'Error: the parcel "%s" is not found. Did you provide the full id@backend parameter?' % line return 2 try: -- GitLab