we should not encode in base64 the string directly 'string'.encode('base64')

Bug #1263555 reported by Chmouel Boudjnah
This bug report is a duplicate of:  Bug #1229161: py33: unknown encoding: base64. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Invalid
Undecided
Chmouel Boudjnah

Bug Description

Since 'string'.encode('base64') is not supported in python3 let use the standard base64 module instead.

This is the kind of python3 error we are getting currently :

======================================================================
FAIL: novaclient.tests.v1_1.test_servers.ServersTest.test_create_server_userdata_unicode
tags: worker-3
----------------------------------------------------------------------
Empty attachments:
  stderr
  stdout

Traceback (most recent call last):
  File "/Users/GIT/openstack/python-novaclient/novaclient/tests/v1_1/test_servers.py", line 120, in test_create_server_userdata_unicode
    '/tmp/foo.txt': six.StringIO('data'), # a stream
  File "/Users/GIT/openstack/python-novaclient/novaclient/v1_1/servers.py", line 658, in create
    **boot_kwargs)
  File "/Users/GIT/openstack/python-novaclient/novaclient/base.py", line 363, in _boot
    'contents': data.encode('base64'),
LookupError: unknown encoding: base64

Revision history for this message
Chmouel Boudjnah (chmouel) wrote :

Never mind this is already fixed in 1229161

Changed in python-novaclient:
assignee: nobody → Chmouel Boudjnah (chmouel)
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.