Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2019-03-17 00:54:52 +0300
committerPhilipp Hörist <philipp@hoerist.com>2019-03-17 00:56:15 +0300
commit34c911de27e024d9125d7f1aa6d0f17859ffc7cd (patch)
treef6d8fa12aa70085902158adda439e7e5a9579003 /acronyms_expander
parentd036b0f6886ef9283bd46b0be86a6db9684a726f (diff)
[acronyms] Make open call python 3.5 compatible
Diffstat (limited to 'acronyms_expander')
-rw-r--r--acronyms_expander/acronyms_expander.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/acronyms_expander/acronyms_expander.py b/acronyms_expander/acronyms_expander.py
index d9f395e..21fc166 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):