def _check_connectivity(self, err):

        ''' a method to check connectivity as source of error '''
        
        try:
            import requests
            requests.get(self.uptime_ssl)
        except:
            from requests import Request
            request_object = Request(method='GET', url=self.uptime_ssl)
            request_details = self.handle_requests(request_object)
            self.printer('ERROR.')
            raise ConnectionError(request_details['error'])
        self.printer('ERROR.')
        raise err
a method to check connectivity as source of error