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