Skip to content

Commit

Permalink
Fix #3552: linkcheck raises UnboundLocalError
Browse files Browse the repository at this point in the history
  • Loading branch information
tk0miya committed Mar 18, 2017
1 parent ada9aa6 commit 2dae11a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -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)
=====================================
Expand Down
4 changes: 3 additions & 1 deletion sphinx/builders/linkcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ def check_uri():
# history contains any redirects, get last
if response.history:
code = response.history[-1].status_code
return 'redirected', new_url, code
return 'redirected', new_url, code
else:
return 'redirected', new_url, 0

def check():
# check for various conditions without bothering the network
Expand Down

0 comments on commit 2dae11a

Please sign in to comment.