summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-10-01 08:08:50 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-10-01 08:08:50 (GMT)
commitf731bc09fa70226f4fd641feb75801058b8bdd71 (patch)
treefc478f25b74ac21fd5f1e6ac1a9758f2a0595673 /Lib/importlib
parent78cc2e89687f3f2b7fd404831a6ea19baccf8c81 (diff)
downloadcpython-f731bc09fa70226f4fd641feb75801058b8bdd71.zip
cpython-f731bc09fa70226f4fd641feb75801058b8bdd71.tar.gz
cpython-f731bc09fa70226f4fd641feb75801058b8bdd71.tar.bz2
Issue #25280: Import trace messages emitted in verbose (-v) mode are no
longer formatted twice.
Diffstat (limited to 'Lib/importlib')
-rw-r--r--Lib/importlib/_bootstrap.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
index 5b91c05..64bbb46 100644
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -620,15 +620,15 @@ def _validate_bytecode_header(data, source_stats=None, name=None, path=None):
raw_size = data[8:12]
if magic != MAGIC_NUMBER:
message = 'bad magic number in {!r}: {!r}'.format(name, magic)
- _verbose_message(message)
+ _verbose_message('{}', message)
raise ImportError(message, **exc_details)
elif len(raw_timestamp) != 4:
message = 'reached EOF while reading timestamp in {!r}'.format(name)
- _verbose_message(message)
+ _verbose_message('{}', message)
raise EOFError(message)
elif len(raw_size) != 4:
message = 'reached EOF while reading size of source in {!r}'.format(name)
- _verbose_message(message)
+ _verbose_message('{}', message)
raise EOFError(message)
if source_stats is not None:
try:
@@ -638,7 +638,7 @@ def _validate_bytecode_header(data, source_stats=None, name=None, path=None):
else:
if _r_long(raw_timestamp) != source_mtime:
message = 'bytecode is stale for {!r}'.format(name)
- _verbose_message(message)
+ _verbose_message('{}', message)
raise ImportError(message, **exc_details)
try:
source_size = source_stats['size'] & 0xFFFFFFFF