def poll(self, offset=None, poll_timeout=600, cooldown=60, debug=False):
    'These should also be in the config section, but some here for\n        overrides\n\n        '
    if (self.config['api_key'] is None):
        raise ValueError('config api_key is undefined')
    if (offset or self.config.get('offset', None)):
        self.offset = (offset or self.config.get('offset', None))
    self._start()
    while True:
        try:
            response = self.get_updates(poll_timeout, self.offset)
            if (response.get('ok', False) is False):
                raise ValueError(response['error'])
            else:
                self.process_updates(response)
        except Exception as e:
            print('Error: Unknown Exception')
            print(e)
            if debug:
                raise e
            else:
                time.sleep(cooldown)
These should also be in the config section, but some here for
overrides
def poll(self, offset=None, poll_timeout=600, cooldown=60, debug=False):
    'These should also be in the config section, but some here for\n        overrides\n\n        '
    if (self.config['api_key'] is None):
        raise ValueError('config api_key is undefined')
    if (offset or self.config.get('offset', None)):
        self.offset = (offset or self.config.get('offset', None))
    self._start()
    while True:
        try:
            response = self.get_updates(poll_timeout, self.offset)
            if (response.get('ok', False) is False):
                raise ValueError(response['error'])
            else:
                self.process_updates(response)
        except Exception as e:
            print('Error: Unknown Exception')
            print(e)
            if debug:
                raise e
            else:
                time.sleep(cooldown)