changeset 118:12cb931dbea0

docker (base): fixed bad escaping in add_host script, resulting in domain not put in /etc/hosts
author Goffi <goffi@goffi.org>
date Tue, 08 Mar 2016 17:54:11 +0100
parents 834bedf42332
children 5d2eb2f61dc8
files docker/base/scripts/add_host
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/docker/base/scripts/add_host	Tue Mar 08 13:52:11 2016 +0100
+++ b/docker/base/scripts/add_host	Tue Mar 08 17:54:11 2016 +0100
@@ -13,6 +13,6 @@
 
 print "Adding host {} as an alias of {}".format(host, alias)
 with open("/etc/hosts", "r+") as f:
-    buf = re.sub(r"\\b{}\\b".format(alias), "{}\\t{}".format(alias, host), f.read(), 1)
+    buf = re.sub(r"\b{}\b".format(alias), "{}\t{}".format(alias, host), f.read(), 1)
     f.seek(0)
     f.write(buf)