Commit 3897c003 authored by Seblu's avatar Seblu
Browse files

catch connecion error

parent 861fbed9
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ class Cli(object):

    def _connect(self):
        self.printer.debug("Connecting...")
        try:
            rpcc = SimpleRpcClient.from_addr(self.settings["server"],
                                             self.settings["port"],
                                             enable_ssl=True,
@@ -66,6 +67,9 @@ class Cli(object):
                                        )
            rpcc.start(daemonize=True)
            self.rpc = ConnectionProxy(rpcc)
        except Exception:
            raise cliError("Connection failure!")
        self.printer.debug("Connected.")

    def _auth(self):
        '''Handle server authentification'''