Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a868628

Browse filesBrowse files
[3.13] gh-128731: Explicitly close socket on error in robotparser.RobotFileParser.read() (GH-128733) (GH-128755)
(cherry picked from commit 5e65a1a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent b106576 commit a868628
Copy full SHA for a868628

File tree

Expand file treeCollapse file tree

1 file changed

+1
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-0
lines changed

‎Lib/urllib/robotparser.py

Copy file name to clipboardExpand all lines: Lib/urllib/robotparser.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def read(self):
6565
self.disallow_all = True
6666
elif err.code >= 400 and err.code < 500:
6767
self.allow_all = True
68+
err.close()
6869
else:
6970
raw = f.read()
7071
self.parse(raw.decode("utf-8").splitlines())

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.