switched to iterator as per comments

pull/18777/head
Brian Coca 10 years ago committed by Matt Clay
parent a32a50568e
commit c071d6a85c

@ -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='):

Loading…
Cancel
Save