small cleanups

This commit is contained in:
dgtlmoon
2022-05-17 22:06:20 +02:00
parent 0f72471343
commit efae86c134
3 changed files with 0 additions and 7 deletions

View File

@@ -3,17 +3,14 @@ import chardet
import os
import requests
import time
import urllib3.exceptions
import sys
class EmptyReply(Exception):
def __init__(self, status_code, url):
# Set this so we can use it in other parts of the app
self.status_code = status_code
self.url = url
return
pass
class ReplyWithContentButNoText(Exception):
@@ -22,7 +19,6 @@ class ReplyWithContentButNoText(Exception):
self.status_code = status_code
self.url = url
return
pass

View File

@@ -189,7 +189,6 @@ class perform_site_check():
if not empty_pages_are_a_change and len(stripped_text_from_html.strip()) == 0:
raise content_fetcher.ReplyWithContentButNoText(url=url, status_code=200)
# We rely on the actual text in the html output.. many sites have random script vars etc,
# in the future we'll implement other mechanisms.

View File

@@ -19,8 +19,6 @@ def set_original_response():
f.write(test_return_data)
return None
def set_modified_response():
test_return_data = """<html>
<head><title>modified head title</title></head>