mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 16:38:43 +00:00
Make sure auth file is closed during get_localhost_auth
This commit is contained in:
parent
e263db90ce
commit
502f135b15
1 changed files with 20 additions and 19 deletions
|
@ -416,7 +416,8 @@ def get_localhost_auth():
|
|||
from deluge.common import 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("#"):
|
||||
# This is a comment line
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue