summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/subprocess.py4
-rw-r--r--Lib/test/support.py9
2 files changed, 6 insertions, 7 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 2e7864c..06454f3 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -724,7 +724,7 @@ class Popen(object):
# Windows methods
#
def _get_handles(self, stdin, stdout, stderr):
- """Construct and return tupel with IO objects:
+ """Construct and return tuple with IO objects:
p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
"""
if stdin is None and stdout is None and stderr is None:
@@ -959,7 +959,7 @@ class Popen(object):
# POSIX methods
#
def _get_handles(self, stdin, stdout, stderr):
- """Construct and return tupel with IO objects:
+ """Construct and return tuple with IO objects:
p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
"""
p2cread, p2cwrite = None, None
diff --git a/Lib/test/support.py b/Lib/test/support.py
index f24adc8..e11fbae 100644
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -453,13 +453,12 @@ def open_urlresource(url, *args, **kw):
requires('urlfetch')
filename = urllib.parse.urlparse(url)[2].split('/')[-1] # '/': it's URL!
- for path in [os.path.curdir, os.path.pardir]:
- fn = os.path.join(path, filename)
- if os.path.exists(fn):
- return open(fn, *args, **kw)
+ fn = os.path.join(os.path.dirname(__file__), "data", filename)
+ if os.path.exists(fn):
+ return open(fn)
print('\tfetching %s ...' % url, file=get_original_stdout())
- fn, _ = urllib.request.urlretrieve(url, filename)
+ fn, _ = urllib.request.urlretrieve(url, fn)
return open(fn, *args, **kw)