Comment 2 for bug 1463373

Revision history for this message
Nicholas Van Wiggeren (nvanwiggeren) wrote : Re: cc_apt_configure does not work with python3

Hi Dan,

Thanks for taking the time to reply so quickly. I made a small change to cc_apt_configure.py so it would print the stack trace upon running. The full trace looks like this:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cloudinit/config/cc_apt_configure.py", line 208, in add_sources
    ent['key'] = getkeybyid(ent['keyid'], ks)
  File "/usr/lib/python3/dist-packages/cloudinit/config/cc_apt_configure.py", line 114, in getkeybyid
    fh.write(EXPORT_GPG_KEYID)
  File "/usr/lib/python3.4/tempfile.py", line 538, in func_wrapper
    return func(*args, **kwargs)
TypeError: 'str' does not support the buffer interface

The diff to of cc_apt_configure.py looks like this:

diff cc_apt_configure.py cc_apt_configure_stack.py
23a24
> import traceback
208c209,210
< except:
---
> except Exception:
> traceback.print_exc()

If you need anything else, let me know! I'm happy to help you get access to a machine with this configuration if you want to poke around yourself.