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
# 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)