Skip to content
Snippets Groups Projects
Commit 34c911de authored by Philipp Hörist's avatar Philipp Hörist
Browse files

[acronyms] Make open call python 3.5 compatible

parent d036b0f6
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment