Commit 180bee9c authored by PERNOT Guillaume's avatar PERNOT Guillaume

Revert "try harder commands"

This reverts commit 7ba238de.
parent 7ba238de
......@@ -37,25 +37,15 @@ logging.basicConfig(filename='atsctl.log', level=logging.DEBUG)
def cmd(proc, msg, expect=None, error=None):
#if DEVEL:
# print(msg)
output = proc.run_command(msg, timeout=None)
for i in range(3):
_err = False
output = proc.run_command(msg, timeout=None)
if error is not None and re.match(error, output):
# an error occured. wait a minute before trying again.
logging.error(output)
time.sleep(60)
_err = True
continue
#raise Exception(output)
if expect is None:
return None
if _err:
if error is not None and re.match(error, output):
logging.error(output)
raise Exception(output)
if expect is None:
return None
m = re.match(expect, output)
if m is None:
logging.error(output)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment