def __init__(self, host, port, user, password): super(User, self).__init__() for _ in range(9): try: self._vnc_proxy = VncConnectionProxy(host, port, user, password) self._vnc_proxy.connect() return except Exception, ex: #pylint: disable=W0703 print "Connection attempt failed (%s), retrying" % str(ex)
class User(windows_user.WindowsUser): ''' Wraps to an out of process implementation of vncdotool ''' def __init__(self, host, port, user, password): super(User, self).__init__() for _ in range(9): try: self._vnc_proxy = VncConnectionProxy(host, port, user, password) self._vnc_proxy.connect() return except Exception, ex: #pylint: disable=W0703 print "Connection attempt failed (%s), retrying" % str(ex) self._vnc_proxy = VncConnectionProxy(host, port, user, password) self._vnc_proxy.connect()