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'])
f = open(configfile, 'r', 'utf-8')
t = f.read()
f.close()
with open(configfile, 'r', 'utf-8') as f:
t = f.read()
for i in t.split(u'\n'):
radiodef = i.split('\t')
radioname = radiodef[0].lower()