X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fcommon%2Futils.py;h=7228e5c542dc6095a7606f60564ae56292686ef1;hb=2743476d62148f3712e0617328f3511e6c2dfad8;hp=8e784597a062cc96bb0906971023e41f208d9d46;hpb=e84eb31aded0cb62a5523422ddc4524f6e615209;p=osm%2Fosmclient.git diff --git a/osmclient/common/utils.py b/osmclient/common/utils.py index 8e78459..7228e5c 100644 --- a/osmclient/common/utils.py +++ b/osmclient/common/utils.py @@ -17,16 +17,16 @@ import time -def wait_for_value(func, result=True, wait_time=10, catch_exception = None ): +def wait_for_value(func, result=True, wait_time=10, catch_exception=None): maxtime = time.time() + wait_time while time.time() < maxtime: try: if func() == result: - return True - except catch_exception as inst: + return True + except catch_exception: pass time.sleep(1) try: return func() == result - except catch_exception as inst: + except catch_exception: return False