diff options
author | Vlastimil Holer <vlastimil.holer@gmail.com> | 2012-12-20 13:20:57 +0100 |
---|---|---|
committer | Vlastimil Holer <vlastimil.holer@gmail.com> | 2012-12-20 13:20:57 +0100 |
commit | 5746598d3cffe07dbae155347eaa44aae48ff572 (patch) | |
tree | 28b62473e7556808c9b69e71c5454e03ad16ba4e /cloudinit/sources/DataSourceOpenNebula.py | |
parent | 268cdf3458849eb7be41253c38a86c68bbddde59 (diff) | |
download | vyos-cloud-init-5746598d3cffe07dbae155347eaa44aae48ff572.tar.gz vyos-cloud-init-5746598d3cffe07dbae155347eaa44aae48ff572.zip |
Change context variables .replace with .decode
Diffstat (limited to 'cloudinit/sources/DataSourceOpenNebula.py')
-rw-r--r-- | cloudinit/sources/DataSourceOpenNebula.py | 6 |
1 files changed, 1 insertions, 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) |