Fall back to non-locked tests on systems without interprocess locking permission (eg. Travis).
This commit is contained in:
parent
44679d8a7f
commit
6081021a24
1 changed files with 5 additions and 1 deletions
|
@ -54,7 +54,11 @@ class _ComicTester(TestCase):
|
|||
scraperobj = self.scraperclass()
|
||||
# Limit number of connections to one host.
|
||||
host = get_host(scraperobj.url)
|
||||
with get_lock(host):
|
||||
try:
|
||||
with get_lock(host):
|
||||
self._test_comic(scraperobj)
|
||||
except OSError:
|
||||
# interprocess lock not supported
|
||||
self._test_comic(scraperobj)
|
||||
|
||||
def _test_comic(self, scraperobj):
|
||||
|
|
Loading…
Reference in a new issue