summaryrefslogtreecommitdiffstats
path: root/Lib/urllib2.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/urllib2.py')
-rw-r--r--Lib/urllib2.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urllib2.py b/Lib/urllib2.py
index 948c6c3..244d737 100644
--- a/Lib/urllib2.py
+++ b/Lib/urllib2.py
@@ -115,7 +115,7 @@ from urllib import localhost, url2pathname, getproxies
__version__ = sys.version[:3]
_opener = None
-def urlopen(url, data=None, timeout=None):
+def urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
global _opener
if _opener is None:
_opener = build_opener()
@@ -357,7 +357,7 @@ class OpenerDirector:
if result is not None:
return result
- def open(self, fullurl, data=None, timeout=None):
+ def open(self, fullurl, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
# accept a URL or a Request object
if isinstance(fullurl, str):
req = Request(fullurl, data)