Unicode tweaks for profiles.py errors and warnings

This commit is contained in:
Greg Neagle
2017-05-09 15:14:09 -07:00
parent 3d0e615837
commit ccd257860a

View File

@@ -209,14 +209,14 @@ def install_profile(profile_path, profile_identifier):
stdout = proc.communicate()[0]
if proc.returncode != 0:
display.display_error(
'Profile %s installation failed: %s'
% (os.path.basename(profile_path), stdout))
u'Profile %s installation failed: %s'
% (os.path.basename(profile_path), stdout.decode('UTF-8')))
return False
if profile_identifier:
record_profile_receipt(profile_path, profile_identifier)
else:
display.display_warning(
'No identifier for profile %s; cannot record an installation '
u'No identifier for profile %s; cannot record an installation '
'receipt.' % os.path.basename(profile_path))
return True