From e6346108506656b7a7d1514b7b5219f82022cac8 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Tue, 16 Apr 2024 08:42:55 +0200 Subject: Updated some python to recent syntax. --- lesana/collection.py | 6 +++--- 1 file 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)) ) -- cgit v1.2.3