diff --git a/libs/locallibs/sleep_wait.py b/libs/locallibs/sleep_wait.py index 8914f33f8e1e11afc45038bef166a975d0e7289a..d1f162a968b25b58a2730df6fea88f4dfa6d2bed 100644 --- a/libs/locallibs/sleep_wait.py +++ b/libs/locallibs/sleep_wait.py @@ -71,6 +71,7 @@ def sleep_wait(wait_time, cmd=None, mode=1): if cmd and mode == 2: init = 0 while init < wait_time: + init += 1 time.sleep(1) exitcode, output = subprocess.getstatusoutput(cmd) if exitcode == 0: @@ -79,8 +80,6 @@ def sleep_wait(wait_time, cmd=None, mode=1): elif init == wait_time: sys.exit(exitcode) - init += 1 - if __name__ == "__main__": parser = argparse.ArgumentParser(description="manual to this script")