diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-09-23 08:00:19 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-09-23 08:00:19 +0530 |
commit | 95e7a63aa9eeb1dd76129edcf186d81350b43dd2 (patch) | |
tree | 966bc73fc5d68ca9ed0a4af63719a555a51d5e7a | |
parent | 8f8d25c6fe219233dda60de266ef837e79bde67a (diff) |
bin/nixpkgs_drv_pname: close fds asap, don't wait for gc
-rwxr-xr-x | bin/nixpkgs_drv_pname.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/nixpkgs_drv_pname.py b/bin/nixpkgs_drv_pname.py index 52852cf..88cf732 100755 --- a/bin/nixpkgs_drv_pname.py +++ b/bin/nixpkgs_drv_pname.py @@ -80,6 +80,7 @@ class drv: 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) |