make 2.4 compatible

fixes #24148
This commit is contained in:
Brian Coca 2017-05-01 09:26:29 -04:00
parent 98d223a51b
commit 8a604185fd

View file

@ -317,7 +317,7 @@ class SysctlModule(object):
self.file_lines.append(line)
# don't split empty lines or comments
if not line or line.startswith(("#", ";")):
if not line or line.startswith("#") or line.startswith(";"):
continue
k, v = line.split('=',1)
@ -330,7 +330,7 @@ class SysctlModule(object):
checked = []
self.fixed_lines = []
for line in self.file_lines:
if not line.strip() or line.strip().startswith(("#", ";")):
if not line.strip() or line.startswith("#") or line.startswith(";"):
self.fixed_lines.append(line)
continue
tmpline = line.strip()