X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fcommon%2Fwait.py;h=d8923ba988ab74f50ca3f31011c5f2a5795cb9d3;hb=10bcf77a90b49da2ac3701bdd3c51e57130ff7c9;hp=e3152af145cbe8cdbd4636d452ae115c46c45b88;hpb=12138cdda2fb241cb440b1224d4a3b2202107f35;p=osm%2Fosmclient.git diff --git a/osmclient/common/wait.py b/osmclient/common/wait.py index e3152af..d8923ba 100644 --- a/osmclient/common/wait.py +++ b/osmclient/common/wait.py @@ -18,7 +18,7 @@ OSM API handling for the '--wait' option """ -from osmclient.common.exceptions import ClientException +from osmclient.common.exceptions import ClientException, NotFound import json from time import sleep import sys @@ -192,7 +192,9 @@ def wait_for_status(entity_label, entity_id, timeout, apiUrlStatus, http_cmd, de # There was a timeout, so raise an exception raise ClientException('operation timeout, waited for {} seconds'.format(timeout)) except ClientException as exc: - message="Operation failed for {}:\nerror:\n{}".format( + if deleteFlag and isinstance(exc, NotFound): + return + message = "Operation failed for {}:\nerror:\n{}".format( entity_label, str(exc)) raise ClientException(message)