Skip to content

Commit

Permalink
Linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tw4l committed Mar 13, 2024
1 parent 1f00003 commit ee764dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend/btrixcloud/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ async def _add_pages_to_db(self, pages: List[Page]):
for page in pages
]
)
if not len(result.inserted_ids):
if not result.inserted_ids:
# pylint: disable=broad-exception-raised
raise Exception("No pages inserted")

async def add_page_to_db(self, page_dict: Dict[str, Any], crawl_id: str, oid: UUID):
Expand All @@ -130,7 +131,7 @@ async def add_page_to_db(self, page_dict: Dict[str, Any], crawl_id: str, oid: UU
# pylint: disable=broad-except
except Exception as err:
print(
f"Error adding page {page_id} from crawl {crawl_id} to db: {err}",
f"Error adding page {page.id} from crawl {crawl_id} to db: {err}",
flush=True,
)

Expand Down

0 comments on commit ee764dc

Please sign in to comment.