home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1291093581

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/sqlite-utils/issues/503#issuecomment-1291093581 https://api.github.com/repos/simonw/sqlite-utils/issues/503 1291093581 IC_kwDOCGYnMM5M9IZN 9599 2022-10-25T20:23:00Z 2022-10-25T20:23:00Z OWNER

I'm not hugely happy with my fix there:

https://github.com/simonw/sqlite-utils/blob/c5d7ec1dd71fa1dce829bc8bb82b639018befd63/sqlite_utils/db.py#L321-L328

The problem here was that in the case where the os.remove() failed the self.conn property was NOT being set to a valid connection - which caused __repr__ to fail later on.

So now I catch the os.remove() error, set self.conn to a memory connection, then raise the error again.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
1423000702  
Powered by Datasette · Queries took 8.27ms · About: github-to-sqlite