Skip to content

Commit

Permalink
feat(database_store): Use new convert_exceptions_to_warnings argument…
Browse files Browse the repository at this point in the history
… (fixup)
  • Loading branch information
jpmckinney committed May 8, 2024
1 parent b462246 commit 9413953
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kingfisher_scrapy/extensions/database_store.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import csv
import os
import warnings
from datetime import datetime

import ijson
Expand Down Expand Up @@ -130,9 +131,9 @@ def spider_closed(self, spider, reason):
writer.writerow([util.json_dumps(item, ensure_ascii=False).replace(r'\u0000', '')])
count += 1

logger.error(
spider.logger.error(
"%d OCIDs can't be merged due to structural errors",
len(list(_ for _ in w if issubclass(warning.category, MergeErrorWarning)))
len([warning for warning in w if issubclass(warning.category, MergeErrorWarning)])
)

spider.logger.info('Replacing the JSON data in the %s table (%s rows)', table_name, count)
Expand Down

0 comments on commit 9413953

Please sign in to comment.