From 0473a7f4acacdfe2d9e3840a6f89399f60f7a9d2 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Thu, 24 Oct 2013 13:22:00 -0700 Subject: improve error message on failure of add-apt-repository --- cloudinit/config/cc_apt_configure.py | 5 +++-- 1 file 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: -- cgit v1.2.3