encode credential_report to ascii to help the base64 encoding work.

This commit is contained in:
Mike Fuller 2015-02-04 12:39:28 +11:00
parent 96e5f2875d
commit ffff67692c

View File

@ -446,6 +446,6 @@ class IAMBackend(BaseBackend):
report = 'user,arn,user_creation_time,password_enabled,password_last_used,password_last_changed,password_next_rotation,mfa_active,access_key_1_active,access_key_1_last_rotated,access_key_2_active,access_key_2_last_rotated,cert_1_active,cert_1_last_rotated,cert_2_active,cert_2_last_rotated\n'
for user in self.users:
report += self.users[user].to_csv()
return base64.b64encode(report)
return base64.b64encode(report.encode('ascii'))
iam_backend = IAMBackend()