summaryrefslogtreecommitdiffstats
path: root/Lib/imp.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-04-17 00:44:21 (GMT)
committerBrett Cannon <brett@python.org>2012-04-17 00:44:21 (GMT)
commitde10bf4f4d655eef5e015931ef9891d6989887e9 (patch)
treecc6af154423accad539a120950fe4b6b2a542182 /Lib/imp.py
parentf138f8c1ab94618402c80c602d3d31acb0ac6910 (diff)
downloadcpython-de10bf4f4d655eef5e015931ef9891d6989887e9.zip
cpython-de10bf4f4d655eef5e015931ef9891d6989887e9.tar.gz
cpython-de10bf4f4d655eef5e015931ef9891d6989887e9.tar.bz2
Issue #13959: Fix a logic bug.
Diffstat (limited to 'Lib/imp.py')
-rw-r--r--Lib/imp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/imp.py b/Lib/imp.py
index 62623b6..2832d54 100644
--- a/Lib/imp.py
+++ b/Lib/imp.py
@@ -45,7 +45,7 @@ def load_module(name, file, filename, details):
"""
suffix, mode, type_ = details
- if mode and (not mode.startswith(('r', 'U'))) or '+' in mode:
+ if mode and (not mode.startswith(('r', 'U')) or '+' in mode):
raise ValueError('invalid file open mode {!r}'.format(mode))
elif file is None and type_ in {PY_SOURCE, PY_COMPILED}:
msg = 'file object required for import (type code {})'.format(type_)