Catch parcelnotfound by untracking

This commit is contained in:
Florent 2014-09-22 17:05:11 +02:00
commit 6f1b58d6a5

View file

@ -131,9 +131,13 @@ class Parceloob(ReplApplication):
pass pass
if not removed: 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: 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 return 2
try: try: