Make sure auth file is closed during get_localhost_auth
This commit is contained in:
parent
e263db90ce
commit
502f135b15
|
@ -416,7 +416,8 @@ def get_localhost_auth():
|
||||||
from deluge.common import create_localclient_account
|
from deluge.common import create_localclient_account
|
||||||
create_localclient_account()
|
create_localclient_account()
|
||||||
|
|
||||||
for line in open(auth_file):
|
with open(auth_file) as auth:
|
||||||
|
for line in auth:
|
||||||
if line.startswith("#"):
|
if line.startswith("#"):
|
||||||
# This is a comment line
|
# This is a comment line
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue