Skip to content

Commit

Permalink
Fix retry logic
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Sep 14, 2023
1 parent 00a1638 commit 395251b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/lvmieb/actor/commands/transducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ async def status(
pres_list.append(result)
except Exception as err:
error = err
break

if error is not False and iretry < NRETRIES - 1:
command.warning(f"Failed getting pressure status: {error}. Retrying.")
continue
else:
command.error(f"Failed getting pressure status: {error}")
break

if len(pres_list) == 0 or error:
return command.fail(error="Unable to retrieve any pressure data.")
Expand Down

0 comments on commit 395251b

Please sign in to comment.