summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2024-04-16 08:42:55 +0200
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2024-04-16 08:42:55 +0200
commite6346108506656b7a7d1514b7b5219f82022cac8 (patch)
tree7028e4920609798a177d6b4ae5172c6396cccd4a
parent434f2377e84dc533c02111918603bb8b1c1ce1e5 (diff)
Updated some python to recent syntax.
-rw-r--r--lesana/collection.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lesana/collection.py b/lesana/collection.py
index a3c6e22..e4ca1ca 100644
--- a/lesana/collection.py
+++ b/lesana/collection.py
@@ -22,7 +22,7 @@ except ImportError:
git_available = False
-class Entry(object):
+class Entry:
def __init__(self, collection, data={}, fname=None):
self.collection = collection
self.data = data or self.empty_data()
@@ -152,7 +152,7 @@ class Entry(object):
self.data[name] = field.auto(self.data.get(name, None))
-class Collection(object):
+class Collection:
"""
"""
@@ -297,7 +297,7 @@ class Collection(object):
for fname in fnames:
try:
valid, errors = self._index_file(fname, cache)
- except IOError as e:
+ except OSError as e:
logger.warning(
"Could not load file {}: {}".format(fname, str(e))
)