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
pull/95/head
Alex Willmer 7 years ago
parent 7d4317b279
commit be0b997a4c

@ -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