Skip to content
Snippets Groups Projects
Commit a3c1f5d6 authored by BRONES Romain's avatar BRONES Romain
Browse files

Fix retry exception for Device command extract

* The previous code did not handle the retry correctly
parent c7036db2
No related branches found
No related tags found
No related merge requests found
......@@ -447,7 +447,7 @@ class ArchiveExtractor:
None if failed after the amount of retries.
"""
for i in range(retry-1):
for i in range(retry):
# Make retrieval request
self.logger.debug("Execute %s (%s)"%(cmd, arg))
try:
......@@ -455,12 +455,12 @@ class ArchiveExtractor:
except tango.DevFailed as e:
self.logger.warning("The extractor device returned the following error:")
self.logger.warning(e)
if i == retry-1:
logger.error("Could not execute command %s (%s). Check the device extractor"%(cmd, arg))
return None
self.logger.warning("Retrying...")
continue
break
if i==2:
logger.error("Could not execute command %s (%s). Check the device extractor"%(cmd, arg))
return None
return cmdreturn
......
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