summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/doorman/storage/classes.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/admin/doorman/storage/classes.py b/admin/doorman/storage/classes.py
index 113b2e8..84bcb47 100644
--- a/admin/doorman/storage/classes.py
+++ b/admin/doorman/storage/classes.py
@@ -1,5 +1,5 @@
from sys import stderr
-from collections import MutableMapping
+from collections.abc import MutableMapping
from io import StringIO
import csv, json
@@ -12,7 +12,7 @@ class Storage(MutableMapping):
def sync(self):
self.encapsulation.data = self.encode(self.data)
self.encapsulation.end_transaction()
-
+
self.encapsulation.begin_transaction()
def __setitem__(self, k, v):
self.data[k] = v
@@ -30,7 +30,7 @@ class Storage(MutableMapping):
class CsvStorage(Storage):
def decode(self, text):
try:
- stored = {x[0]: [x[1], x[2]]
+ stored = {x[0]: [x[1], x[2]]
for x in csv.reader(StringIO(text))}
except IOError as e:
print(e, file=stderr)
@@ -52,4 +52,3 @@ class JsonStorage(Storage):
return stored
def encode(self, data):
return json.dumps(data, indent=4)
-