Skip to content

Commit fcc2d63

Browse files
committed
Fix a bug when generating the error message in generate_config_file. The stdout and stderr parts are rightly decoded as UTF-8, but then they are formatted into a byte string which (at least on my platform) treats the UTF-8 as ascii and boom! exception is raised trying to generate the error message.
1 parent 67a2b16 commit fcc2d63

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎astropy/setup_helpers.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ def generate_default_config(build_lib, package):
575575
else:
576576
msg = ('Generation of default configuration item failed! Stdout '
577577
'and stderr are shown below.\n'
578-
'Stdout:\n{stdout}\nStderr:\n{stderr}')
578+
'Stdout:\n{stdout}\nStderr:\n{stderr}').decode('UTF-8')
579579
log.error(msg.format(stdout=stdout.decode('UTF-8'),
580580
stderr=stderr.decode('UTF-8')))
581581

0 commit comments

Comments
 (0)