Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

connect.py 665B

1 year ago
123456789101112131415161718192021222324
  1. # Copyright (c) Twisted Matrix Laboratories.
  2. # See LICENSE for details.
  3. #
  4. from twisted.conch.client import direct
  5. connectTypes = {"direct": direct.connect}
  6. def connect(host, port, options, verifyHostKey, userAuthObject):
  7. useConnects = ["direct"]
  8. return _ebConnect(
  9. None, useConnects, host, port, options, verifyHostKey, userAuthObject
  10. )
  11. def _ebConnect(f, useConnects, host, port, options, vhk, uao):
  12. if not useConnects:
  13. return f
  14. connectType = useConnects.pop(0)
  15. f = connectTypes[connectType]
  16. d = f(host, port, options, vhk, uao)
  17. d.addErrback(_ebConnect, useConnects, host, port, options, vhk, uao)
  18. return d