From 5746598d3cffe07dbae155347eaa44aae48ff572 Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Thu, 20 Dec 2012 13:20:57 +0100 Subject: Change context variables .replace with .decode --- cloudinit/sources/DataSourceOpenNebula.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cloudinit/sources/DataSourceOpenNebula.py b/cloudinit/sources/DataSourceOpenNebula.py index 00c076e6..1622a66e 100644 --- a/cloudinit/sources/DataSourceOpenNebula.py +++ b/cloudinit/sources/DataSourceOpenNebula.py @@ -185,11 +185,7 @@ def read_context_disk_dir(source_dir): # with backslash escapes r=re.match("^\$'(.*)'$",value) if r: - context_sh[key.lower()]=r.group(1).\ - replace('\\\\','\\').\ - replace('\\t','\t').\ - replace('\\n','\n').\ - replace("\\'","'") + context_sh[key.lower()]=r.group(1).decode('string_escape') else: # multiword values r=re.match("^'(.*)'$",value) -- cgit v1.2.3