コード例 #1
0
    def __init__(self):
        self.logs = Logger()
        self.utils = Utils()
        self.config = self.utils.readConfig()
        self.base_url = self.config['api_url']
        self.api_url = '%s/api/v1' % self.config['api_url']
        self.api_token = self.config['api_token']
        self.maxRetries = self.config['retries']

        try:
            if self.checkInitialPing() == 200:
                self.checkSites()
            else:
                exit()
        except Exception as e:
            self.logs.error(e)
            exit()