8 - self.run(cmd, response=['stopped', pexpect.TIMEOUT], timeout=5) 9 - if self.match_id == 0: 10 - return True 11 - time.sleep(1) 12 + try: 13 + self.run(cmd, response=['stopped'], timeout=5) 14 + if self.match_id == 0: 15 + return True 16 + except pexpect.TIMEOUT: 17 + time.sleep(1)
What is the logical change this part is supposed to make? I don't see any. You've traded the explicit timeout handling to an exception based timeout handling
« Back to merge proposal
8 - self.run(cmd, response= ['stopped' , pexpect.TIMEOUT], timeout=5) ['stopped' ], timeout=5)
9 - if self.match_id == 0:
10 - return True
11 - time.sleep(1)
12 + try:
13 + self.run(cmd, response=
14 + if self.match_id == 0:
15 + return True
16 + except pexpect.TIMEOUT:
17 + time.sleep(1)
What is the logical change this part is supposed to make? I don't see any. You've traded the explicit timeout handling to an exception based timeout handling