diff options
-rw-r--r-- | lesana/collection.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lesana/collection.py b/lesana/collection.py index 2ac99aa..738f6ad 100644 --- a/lesana/collection.py +++ b/lesana/collection.py @@ -96,6 +96,7 @@ class Collection(object): # This selects whether to load all other yaml files with # safe_load or load + RoundTripLoader self.safe = False + self.entry_class = Entry def _index_file(self, fname, cache): with open(os.path.join(self.itemdir, fname)) as fp: @@ -103,7 +104,7 @@ class Collection(object): data = ruamel.yaml.safe_load(fp) else: data = ruamel.yaml.load(fp, ruamel.yaml.RoundTripLoader) - entry = Entry(self, data, fname) + entry = self.entry_class(self, data, fname) doc = xapian.Document() self.indexer.set_document(doc) @@ -282,7 +283,7 @@ class Collection(object): doc.get_data(), ruamel.yaml.RoundTripLoader ) - entry = Entry( + entry = self.entry_class( self, data=data, fname=fname, |