mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-20 06:10:59 +00:00
simplify incoming_get_url
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1812 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
51f99f7d79
commit
ff23bbf53d
1 changed files with 7 additions and 6 deletions
|
|
@ -82,13 +82,14 @@ class Cache (object):
|
|||
try:
|
||||
for i, url_data in enumerate(self.incoming):
|
||||
key = url_data.cache_url_key
|
||||
if key not in self.in_progress:
|
||||
if key in self.checked:
|
||||
del self.incoming[i]
|
||||
if key in self.checked:
|
||||
# url is cached and can be logged
|
||||
url_data.copy_from_cache(self.checked[key])
|
||||
else:
|
||||
self.in_progress[key] = url_data
|
||||
# url is cached and can be logged
|
||||
url_data.copy_from_cache(self.checked[key])
|
||||
return url_data
|
||||
elif key not in self.in_progress:
|
||||
del self.incoming[i]
|
||||
self.in_progress[key] = url_data
|
||||
return url_data
|
||||
return None
|
||||
finally:
|
||||
|
|
|
|||
Loading…
Reference in a new issue