1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

fix skipping tests on 5xx status codes

This commit is contained in:
Mike Fährmann 2018-07-19 18:47:23 +02:00
parent 39f609b4c6
commit ce34d82cb4
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -9,6 +9,7 @@
import os
import sys
import re
import unittest
from gallery_dl import extractor, job, config, exception
@ -67,11 +68,8 @@ class TestExtractorResults(unittest.TestCase):
try:
tjob.run()
except exception.HttpError as exc:
try:
if 500 <= exc.args[0].response.status_code < 600:
self.skipTest(exc)
except AttributeError:
pass
if re.match(r"5\d\d HTTP Error:", str(exc)):
self.skipTest(exc)
raise
# test archive-id uniqueness