utils._RunCmdPipe: simplify the timeout logic
There are two issues: first, it's simpler to assign directly to pt instead of via another local variable. Second, this code doesn't make sense: if lt < 0: break pt = max(0, lt) If lt is indeed < 0, then the code will break. Otherwise, lt ≥ 0, and max(0, lt) will always be equal to lt. So we remove the extra assignment. Signed-off-by:Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
Loading
Please register or sign in to comment