From 7e60b4127cfa37cc79635a668eb7a74533e8e196 Mon Sep 17 00:00:00 2001 From: huhamhire Date: Fri, 24 Jan 2014 11:55:57 +0800 Subject: [PATCH] fix make hosts for current system issue --- util/makehosts.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/util/makehosts.py b/util/makehosts.py index 8f7a51d..c506f25 100644 --- a/util/makehosts.py +++ b/util/makehosts.py @@ -70,13 +70,14 @@ class to retrieve configuration with. self.hostname = parent.hostname self.custom = parent.custom make_path = parent.make_path - if parent.make_mode == "system": + self.make_mode = parent.make_mode + if self.make_mode == "system": self.eol = parent.sys_eol self.hosts_file = open("hosts", "wb") - elif parent.make_mode == "ansi": + elif self.make_mode == "ansi": self.eol = "\r\n" self.hosts_file = open(unicode(make_path), "wb") - elif parent.make_mode == "utf-8": + elif self.make_mode == "utf-8": self.eol = "\n" self.hosts_file = open(unicode(make_path), "wb")