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
commit 502f135b15

View file

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