From: Brett Cannon Date: Tue, 17 Apr 2012 00:44:21 +0000 (-0400) Subject: Issue #13959: Fix a logic bug. X-Git-Tag: v3.3.0a3~186 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=de10bf4f4d655eef5e015931ef9891d6989887e9;p=python Issue #13959: Fix a logic bug. --- diff --git a/Lib/imp.py b/Lib/imp.py index 62623b6300..2832d54e27 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_)