Make sure auth file is closed during get_localhost_auth

This commit is contained in:
Chase Sterling 2013-05-11 22:45:15 -04:00
parent e263db90ce
commit 502f135b15
1 changed files with 20 additions and 19 deletions

View File

@ -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