Browse Source

I was raising exceptions wrong, which resulted in a misleading error. I think the issue was that 8chan was down and the cloudflare page had an unusual code, but I can't test since I couldn't reproduce it.

master
Abrax 3 years ago
parent
commit
4727ed8e4c
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      web_methods.py

+ 1
- 2
web_methods.py View File

@@ -67,8 +67,7 @@ def download_file(file_url, file_path):
elif r.status_code == 404:
return False
else:
raise "Unexpected status code {} while trying to fetch {} - try opening in the browser, if that doesn't work " \
"submit an issue to the tracker.".format(r.status_code, file_url)
raise RuntimeError("Unexpected status code {} while trying to fetch {} - try opening in the browser, if that doesn't work submit an issue to the tracker.".format(r.status_code, file_url))


def generate_thread_json_url(board, thread_no):

Loading…
Cancel
Save