diff options
author | Kui Shi <skuicloud@gmail.com> | 2013-09-25 06:24:14 +0800 |
---|---|---|
committer | Kui Shi <skuicloud@gmail.com> | 2013-09-25 06:24:14 +0800 |
commit | 8b264fc61d21fe4d0c7405914fb084f898956888 (patch) | |
tree | a4764422d231994f424440a0c7856296a15ac807 /novaclient/base.py | |
parent | 2ab334435f96e8f9b4c37e26329d3b2a03a8dea4 (diff) | |
download | python-novaclient-8b264fc61d21fe4d0c7405914fb084f898956888.tar.gz |
py33: unknown encoding: base64 Edit
Python 3 doesn't support str.encode('base64'), we should use the
module "base64" instead.
Close-Bug #1229161
Change-Id: I1432952558f8c5c3cff39761306e91916d80207f
Diffstat (limited to 'novaclient/base.py')
-rw-r--r-- | novaclient/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/novaclient/base.py b/novaclient/base.py index 120c698f..a5dad823 100644 --- a/novaclient/base.py +++ b/novaclient/base.py @@ -360,7 +360,7 @@ class BootingManagerWithFind(ManagerWithFind): data = file_or_string personality.append({ 'path': filepath, - 'contents': data.encode('base64'), + 'contents': base64.b64encode(data.encode('utf-8')), }) if availability_zone: |