From de10bf4f4d655eef5e015931ef9891d6989887e9 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 16 Apr 2012 20:44:21 -0400 Subject: [PATCH] Issue #13959: Fix a logic bug. --- Lib/imp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/imp.py b/Lib/imp.py index 62623b63001..2832d54e27a 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_)