diff docker/base/scripts/add_host @ 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 b69056368901
children
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)