Fix #3552: linkcheck raises UnboundLocalError

This commit is contained in:
Takeshi KOMIYA 2017-03-18 18:17:59 +09:00
parent ada9aa6b94
commit 2dae11aa68
2 changed files with 4 additions and 1 deletions

View File

@ -67,6 +67,7 @@ Bugs fixed
* #3450: &nbsp is appeared in EPUB docs
* #3418: Search button is misaligned in nature and pyramid theme
* #3421: Could not translate a caption of tables
* #3552: linkcheck raises UnboundLocalError
Release 1.5.2 (released Jan 22, 2017)
=====================================

View File

@ -168,6 +168,8 @@ class CheckExternalLinksBuilder(Builder):
if response.history:
code = response.history[-1].status_code
return 'redirected', new_url, code
else:
return 'redirected', new_url, 0
def check():
# check for various conditions without bothering the network