« Previous | Next » 

Revision d05cf6fa

IDd05cf6fa8fe843395066c4d9f0f3c0cf7be41674

Added by Iustin Pop over 13 years ago

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 <>
Reviewed-by: René Nussbaumer <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences