From ad3178fe947b8d722baf5a02e77ab1a220519023 Mon Sep 17 00:00:00 2001 From: yumaojun <719118794@qq.com> Date: Sun, 28 Feb 2016 15:23:14 +0800 Subject: [PATCH] =?UTF-8?q?fix=20(install.py):=20=E3=80=80compatable=20cen?= =?UTF-8?q?tos7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. use systemctl stop firewalld 2. add dependence: readline-devel and lrzsz --- install/install.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/install/install.py b/install/install.py index 8d85781c7..4c89e087a 100755 --- a/install/install.py +++ b/install/install.py @@ -82,6 +82,7 @@ class PreSetup(object): self.key = ''.join(random.choice(string.ascii_lowercase + string.digits) \ for _ in range(16)) self.dist = platform.dist()[0].lower() + self.version = platform.dist()[1] @property def _is_redhat(self): @@ -90,10 +91,8 @@ class PreSetup(object): @property def _is_centos7(self): - version = platform.dist()[1] - if self._is_redhat: - if version.startswith("7"): - return True + if self.dist == "centos" and self.version.startswith("7"): + return True @property def _is_ubuntu(self):