Skip to content

Commit

Permalink
bin/nixpkgs_drv_pname: close fds asap, don't wait for gc
Browse files Browse the repository at this point in the history
  • Loading branch information
sinanmohd committed Sep 23, 2024
1 parent 8f8d25c commit 95e7a63
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bin/nixpkgs_drv_pname.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def rowid_from_pname(cursor: sqlite3.Cursor, pname: str) -> int:
def pname_from_drv_path(drv_path: str) -> str | None:
f = open(drv_path, 'r')
drv_string = f.readline()
f.close()
match = re.search('"pname","([^"]+)', drv_string)
if match is not None:
return match.group(1)
Expand Down

0 comments on commit 95e7a63

Please sign in to comment.