summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2013-10-24 13:22:00 -0700
committerScott Moser <smoser@ubuntu.com>2013-10-24 13:22:00 -0700
commit0473a7f4acacdfe2d9e3840a6f89399f60f7a9d2 (patch)
tree12edce7a743f4818f084809dde4db6773c0ed11e
parentcee0343a3d09a465edaadf45749e2b7048376b0a (diff)
downloadvyos-cloud-init-0473a7f4acacdfe2d9e3840a6f89399f60f7a9d2.tar.gz
vyos-cloud-init-0473a7f4acacdfe2d9e3840a6f89399f60f7a9d2.zip
improve error message on failure of add-apt-repository
-rw-r--r--cloudinit/config/cc_apt_configure.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/cloudinit/config/cc_apt_configure.py b/cloudinit/config/cc_apt_configure.py
index 5819897d..b094ea22 100644
--- a/cloudinit/config/cc_apt_configure.py
+++ b/cloudinit/config/cc_apt_configure.py
@@ -183,8 +183,9 @@ def add_sources(srclist, template_params=None, aa_repo_match=None):
if aa_repo_match(source):
try:
util.subp(["add-apt-repository", source])
- except:
- errorlist.append([source, "add-apt-repository failed"])
+ except util.ProcessExecutionError as e:
+ errorlist.append([source,
+ ("add-apt-repository failed. " + str(e))])
continue
if 'filename' not in ent: