fixing up base64 encoding for python 3 back to using base64 module
This commit is contained in:
parent
73a4c83c1a
commit
abae19d273
2 changed files with 4 additions and 4 deletions
|
|
@ -4,7 +4,7 @@ from boto.exception import BotoServerError
|
|||
from moto.core import BaseBackend
|
||||
from .utils import random_access_key, random_alphanumeric, random_resource_id
|
||||
from datetime import datetime
|
||||
import codecs
|
||||
import base64
|
||||
|
||||
class Role(object):
|
||||
|
||||
|
|
@ -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 codecs.encode(report.encode('ascii'), 'base64').decode('ascii')
|
||||
return base64.b64encode(report.encode('ascii')).decode('ascii')
|
||||
|
||||
iam_backend = IAMBackend()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue