mirror of https://github.com/docker/compose.git
Fix exception alias syntax
This commit is contained in:
parent
bf8875d930
commit
3c91315426
fig/cli
|
@ -38,18 +38,18 @@ def main():
|
|||
except KeyboardInterrupt:
|
||||
log.error("\nAborting.")
|
||||
exit(1)
|
||||
except UserError, e:
|
||||
except UserError as e:
|
||||
log.error(e.msg)
|
||||
exit(1)
|
||||
except NoSuchService, e:
|
||||
except NoSuchService as e:
|
||||
log.error(e.msg)
|
||||
exit(1)
|
||||
except NoSuchCommand, e:
|
||||
except NoSuchCommand as e:
|
||||
log.error("No such command: %s", e.command)
|
||||
log.error("")
|
||||
log.error("\n".join(parse_doc_section("commands:", getdoc(e.supercommand))))
|
||||
exit(1)
|
||||
except APIError, e:
|
||||
except APIError as e:
|
||||
log.error(e.explanation)
|
||||
exit(1)
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ class SocketClient:
|
|||
stream.flush()
|
||||
else:
|
||||
break
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
log.debug(e)
|
||||
|
||||
def send_ws(self, socket, stream):
|
||||
|
@ -101,7 +101,7 @@ class SocketClient:
|
|||
else:
|
||||
try:
|
||||
socket.send(chunk)
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
if hasattr(e, 'errno') and e.errno == errno.EPIPE:
|
||||
break
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue