yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #33782
[Bug 1463373] Re: cc_apt_configure does not work with python3
** Also affects: cloud-init (Ubuntu Wily)
Importance: Undecided
Status: Confirmed
** Also affects: cloud-init (Ubuntu Vivid)
Importance: Undecided
Status: New
** Changed in: cloud-init (Ubuntu Vivid)
Status: New => Confirmed
** Changed in: cloud-init (Ubuntu Vivid)
Importance: Undecided => Medium
** Changed in: cloud-init (Ubuntu Wily)
Importance: Undecided => Medium
** Changed in: cloud-init
Importance: Undecided => Medium
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1463373
Title:
cc_apt_configure does not work with python3
Status in Init scripts for use on cloud images:
Fix Committed
Status in cloud-init package in Ubuntu:
Confirmed
Status in cloud-init source package in Vivid:
Confirmed
Status in cloud-init source package in Wily:
Confirmed
Bug description:
The way cc_apt_configure.py writes out the script to fetch GPG keys
breaks when using Python 3.
* There's a constant, http://bazaar.launchpad.net/~cloud-init-dev
/cloud-init/trunk/view/head:/cloudinit/config/cc_apt_configure.py#L39
that contains the script.
* In getkeybyid, it's written to a temporary file:
http://bazaar.launchpad.net/~cloud-init-dev/cloud-
init/trunk/view/head:/cloudinit/config/cc_apt_configure.py#L113
Python 3 throws an exception: 'str' does not support the buffer
interface when doing the write.
A very simple example:
import tempfile
fh = tempfile.NamedTemporaryFile()
TEST_STR = """ HELLO WORLD """
fh.write(TEST_STR)
Will work with 2, but not 3.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1463373/+subscriptions
References