updated to use with open() as

This commit is contained in:
Fredrick W. Warren 2024-09-10 12:33:49 -06:00
parent 3ccb9c9b60
commit f45f25dd9d

View File

@ -43,9 +43,8 @@ class Application(wmoo.Application):
configfile = sep.join([environ['HOME'], '.pyradiorc']) configfile = sep.join([environ['HOME'], '.pyradiorc'])
f = open(configfile, 'r', 'utf-8') with open(configfile, 'r', 'utf-8') as f:
t = f.read() t = f.read()
f.close()
for i in t.split(u'\n'): for i in t.split(u'\n'):
radiodef = i.split('\t') radiodef = i.split('\t')
radioname = radiodef[0].lower() radioname = radiodef[0].lower()