Commit 19119237 authored by Genevieve Helsel's avatar Genevieve Helsel Committed by Facebook GitHub Bot

fix use before assignment case

Summary: If retries is 0, then `0 < 0` is false, meaning we will skip the `while` loop completely and just try to read retcode, which was never assigned.

Reviewed By: fanzeyi

Differential Revision: D23999523

fbshipit-source-id: fac4a1104eba3585fb52fc8d83163cb1a87b8fee
parent 45d40269
...@@ -709,7 +709,7 @@ if __name__ == "__main__": ...@@ -709,7 +709,7 @@ if __name__ == "__main__":
args += ["-R", test_filter] args += ["-R", test_filter]
count = 0 count = 0
while count < retry: while count <= retry:
retcode = self._run_cmd( retcode = self._run_cmd(
args, env=env, use_cmd_prefix=use_cmd_prefix, allow_fail=True args, env=env, use_cmd_prefix=use_cmd_prefix, allow_fail=True
) )
......
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