Example #1
0
    def connect(self):
        """
        Connect to the PO Project API service
        """
        # Open client
        self.con = GestusClient(self.args.host,
                                (self.args.user, self.args.password))

        # Connect to the service
        try:
            self.con.connect()
        except (HTTPError, ConnectionError, InvalidSchema) as e:
            import traceback
            top = traceback.extract_stack()[-1]
            self.root_logger.error("%s: %s", type(e).__name__, e)
            raise CommandError('Error exit')