switched to iterator as per comments

This commit is contained in:
Brian Coca 2014-11-11 09:39:03 -05:00 committed by Matt Clay
parent a32a50568e
commit c071d6a85c

View file

@ -313,7 +313,7 @@ class OpenRCStrategy(GenericStrategy):
def set_permanent_hostname(self, name):
try:
f = open(self.HOSTNAME_FILE, 'r')
lines = [x.strip() for x in f]
lines = (x.strip() for x in f)
for i, line in enumerate(lines):
if line.startswith('hostname='):