From 34c911de27e024d9125d7f1aa6d0f17859ffc7cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Philipp=20H=C3=B6rist?= <philipp@hoerist.com>
Date: Sat, 16 Mar 2019 22:54:52 +0100
Subject: [PATCH] [acronyms] Make open call python 3.5 compatible

---
 acronyms_expander/acronyms_expander.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/acronyms_expander/acronyms_expander.py b/acronyms_expander/acronyms_expander.py
index d9f395e7..21fc166e 100644
--- a/acronyms_expander/acronyms_expander.py
+++ b/acronyms_expander/acronyms_expander.py
@@ -60,7 +60,7 @@ class AcronymsExpanderPlugin(GajimPlugin):
         if not path.exists():
             return DEFAULT_DATA
 
-        with open(path, 'r') as file:
+        with path.open('r') as file:
             acronyms = json.load(file)
         return acronyms
 
@@ -76,7 +76,8 @@ class AcronymsExpanderPlugin(GajimPlugin):
         if not path.exists():
             path.mkdir(parents=True)
 
-        with open(path / 'acronyms', 'w') as file:
+        filepath = path / 'acronyms'
+        with filepath.open('w') as file:
             json.dump(acronyms, file)
 
     def set_acronyms(self, acronyms):
-- 
GitLab