Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _post_load(self):
self._forms = {}
try:
del self._html
except AttributeError:
pass
self.status_code = StatusCode(self._response.status_code, "")
def connect(self, url):
if not (url.startswith("file:") or url.startswith("about:")):
self.request_url = url
self._create_connection()
status_code = self._store_response()
self.conn.close()
else:
status_code = StatusCode(200, 'Ok')
return status_code
def _post_load(self):
self._forms = {}
try:
del self._html
except AttributeError:
pass
self.status_code = StatusCode(self._response.status_code, "")
def _store_response(self):
self.response = self.conn.getresponse()
return StatusCode(self.response.status, self.response.reason)