Merge "NSX|V: Fix devstack cleanup for python 3"

This commit is contained in:
Zuul 2018-09-17 07:02:15 +00:00 committed by Gerrit Code Review
commit e2c939c2c0
1 changed files with 2 additions and 2 deletions

View File

@ -155,7 +155,7 @@ class VSMClient(object):
content_type = self.content_type if content is None else content
accept_type = self.accept_type if accept is None else accept
auth_cred = self.username + ":" + self.password
auth = base64.b64encode(auth_cred)
auth = base64.b64encode(auth_cred.encode()).decode()
headers = {}
headers['Authorization'] = "Basic %s" % auth
headers['Content-Type'] = content_type
@ -396,7 +396,7 @@ def ceil(a, b):
return 0
div = a / b
mod = 0 if a % b is 0 else 1
return div + mod
return int(div + mod)
if __name__ == "__main__":