diff options
author | Brett Cannon <brett@python.org> | 2012-04-17 00:44:21 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-04-17 00:44:21 (GMT) |
commit | de10bf4f4d655eef5e015931ef9891d6989887e9 (patch) | |
tree | cc6af154423accad539a120950fe4b6b2a542182 /Lib/imp.py | |
parent | f138f8c1ab94618402c80c602d3d31acb0ac6910 (diff) | |
download | cpython-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.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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_) |