Skip to content

Commit 4e588b5

Browse files
committed
Add timeout to request in get_wiki_entries function
1 parent ce5c293 commit 4e588b5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mariusz/wiki.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
def get_wiki_entries(url):
1313
"""Returns all Wiki entries for a given URL."""
14-
tree = E.fromstring(requests.get(url).text.encode())
14+
tree = E.fromstring(requests.get(url, timeout=10).text.encode())
1515
entry_f = E.ETXPath(NS + "entry")
1616
entries = entry_f(tree)
1717
updated_f = E.ETXPath(".//" + NS + "updated/text()")

0 commit comments

Comments
 (0)