diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-06-15 17:20:51 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-06-15 17:20:51 -0400 |
commit | 66c13ab5aca67ca3aa3d1536154989f98b85107a (patch) | |
tree | b9790de816a6b05297ddf76a2e396152c798f76a /cloudinit/config | |
parent | ad403f27e1f8067d7709ed9b184589af8309ba15 (diff) | |
download | vyos-cloud-init-66c13ab5aca67ca3aa3d1536154989f98b85107a.tar.gz vyos-cloud-init-66c13ab5aca67ca3aa3d1536154989f98b85107a.zip |
apt_configure: fix importing of apt gpg keys under in python3
LP: #1463373
Diffstat (limited to 'cloudinit/config')
-rw-r--r-- | cloudinit/config/cc_apt_configure.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/config/cc_apt_configure.py b/cloudinit/config/cc_apt_configure.py index 2c51d116..9e9e9e26 100644 --- a/cloudinit/config/cc_apt_configure.py +++ b/cloudinit/config/cc_apt_configure.py @@ -109,7 +109,7 @@ def handle(name, cfg, cloud, log, _args): # get gpg keyid from keyserver def getkeybyid(keyid, keyserver): - with util.ExtendedTemporaryFile(suffix='.sh') as fh: + with util.ExtendedTemporaryFile(suffix='.sh', mode="w+", ) as fh: fh.write(EXPORT_GPG_KEYID) fh.flush() cmd = ['/bin/sh', fh.name, keyid, keyserver] |