correctly close file after it's opened
This commit is contained in:
parent
c0a1e9ee88
commit
db06bddb81
1 changed files with 4 additions and 4 deletions
|
@ -114,8 +114,8 @@ def get_context(fingerprint, verify_cb=None):
|
|||
def send_cert(con, jid_from, sid):
|
||||
certpath = os.path.join(gajim.MY_CERT_DIR, SELF_SIGNED_CERTIFICATE) + \
|
||||
'.cert'
|
||||
certfile = open(certpath, 'r')
|
||||
certificate = ''
|
||||
with open(certpath, 'r') as certfile:
|
||||
for line in certfile.readlines():
|
||||
if not line.startswith('-'):
|
||||
certificate += line
|
||||
|
|
Loading…
Add table
Reference in a new issue