From 46e646fabf3a0f2593dc9d9f231fd075134de36f Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Thu, 20 Dec 2012 15:17:32 +0100 Subject: Change subp exception handling to util.ProcessExecutionError --- cloudinit/sources/DataSourceOpenNebula.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cloudinit/sources') diff --git a/cloudinit/sources/DataSourceOpenNebula.py b/cloudinit/sources/DataSourceOpenNebula.py index a50b0c10..967d7170 100644 --- a/cloudinit/sources/DataSourceOpenNebula.py +++ b/cloudinit/sources/DataSourceOpenNebula.py @@ -208,8 +208,8 @@ def read_context_disk_dir(source_dir): else: # simple values context_sh[key.lower()]=value - except subprocess.CalledProcessError as exc: - LOG.warn("context script faled to read" % (exc.output[1])) + except util.ProcessExecutionError, _err: + LOG.warn("Failed to read context variables: %s" % (_err.message)) results['metadata']=context_sh # process single or multiple SSH keys -- cgit v1.2.3