ssh, sudo: Remove redundant else clause on bootstrap loop

Since the for loops don't contain any break statements the StreamErrors
will always be raised when the loop completes without the method
resturning.

See https://lgtm.com/rules/5980098/

Refs #61
wip-fakessh-exit-status
Alex Willmer 6 years ago committed by David Wilson
parent cbc20f3348
commit 227cd3aa60

@ -126,5 +126,4 @@ class Stream(mitogen.parent.Stream):
LOG.debug('sending password')
self.transmit_side.write(self.password + '\n')
password_sent = True
else:
raise mitogen.core.StreamError('bootstrap failed')
raise mitogen.core.StreamError('bootstrap failed')

@ -107,5 +107,4 @@ class Stream(mitogen.parent.Stream):
LOG.debug('sending password')
os.write(self.transmit_side.fd, self.password + '\n')
password_sent = True
else:
raise mitogen.core.StreamError('bootstrap failed')
raise mitogen.core.StreamError('bootstrap failed')

Loading…
Cancel
Save