Skip to content
Snippets Groups Projects
Commit eaf0b803 authored by Mikhail Karnevskiy's avatar Mikhail Karnevskiy
Browse files

Refactoring

parent ac1d419a
No related branches found
No related tags found
1 merge request!101Fix: Decrement nTryes only in case of zmq timeout
......@@ -489,13 +489,12 @@ def get_from_db(device, constant, condition, empty_constant,
metadata.retrieve(this_interface, timeout=timeout,
meta_only=meta_only)
break
except zmq.error.Again:
ntries -= 1
except Exception as e:
if verbosity > 0:
print(e)
if isinstance(e, zmq.error.Again):
ntries -= 1
else:
ntries = 0
ntries = 0
if ntries > 0:
if verbosity > 0:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment