diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-10-01 08:55:52 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-10-01 08:55:52 (GMT) |
commit | f22d8080ae9f4106d04721fa17660c5b7faf05f2 (patch) | |
tree | 13837191c0b4982d29f81b09a32438fa64cc636a /Lib/importlib | |
parent | 0e25a8f225023cdefd516c5eaccde2c9527d1510 (diff) | |
parent | 0b40aab6f01289e9e6d4f656e23a48ca78e90752 (diff) | |
download | cpython-f22d8080ae9f4106d04721fa17660c5b7faf05f2.zip cpython-f22d8080ae9f4106d04721fa17660c5b7faf05f2.tar.gz cpython-f22d8080ae9f4106d04721fa17660c5b7faf05f2.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_external.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py index abde6d9..e0a1200 100644 --- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -429,15 +429,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) - _bootstrap._verbose_message(message) + _bootstrap._verbose_message('{}', message) raise ImportError(message, **exc_details) elif len(raw_timestamp) != 4: message = 'reached EOF while reading timestamp in {!r}'.format(name) - _bootstrap._verbose_message(message) + _bootstrap._verbose_message('{}', message) raise EOFError(message) elif len(raw_size) != 4: message = 'reached EOF while reading size of source in {!r}'.format(name) - _bootstrap._verbose_message(message) + _bootstrap._verbose_message('{}', message) raise EOFError(message) if source_stats is not None: try: @@ -447,7 +447,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) - _bootstrap._verbose_message(message) + _bootstrap._verbose_message('{}', message) raise ImportError(message, **exc_details) try: source_size = source_stats['size'] & 0xFFFFFFFF |