diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2023-04-09 19:57:41 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2023-04-09 19:57:41 +0200 |
commit | 24207674f36e900fd2aa51787cb70756413962c2 (patch) | |
tree | f254d40b32d918783ae7698b902792963464269d /tools/sops-inventory/sops_inventory/__main__.py | |
parent | 9c67ce4623ae1f2bf9a9d71de781c12054c1001c (diff) | |
download | nixos-24207674f36e900fd2aa51787cb70756413962c2.tar nixos-24207674f36e900fd2aa51787cb70756413962c2.tar.gz nixos-24207674f36e900fd2aa51787cb70756413962c2.tar.bz2 nixos-24207674f36e900fd2aa51787cb70756413962c2.tar.xz nixos-24207674f36e900fd2aa51787cb70756413962c2.zip |
deprecate mach_nix
Diffstat (limited to 'tools/sops-inventory/sops_inventory/__main__.py')
-rw-r--r-- | tools/sops-inventory/sops_inventory/__main__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/sops-inventory/sops_inventory/__main__.py b/tools/sops-inventory/sops_inventory/__main__.py index aaddda8c..f43b7c2f 100644 --- a/tools/sops-inventory/sops_inventory/__main__.py +++ b/tools/sops-inventory/sops_inventory/__main__.py | |||
@@ -20,12 +20,14 @@ except ImportError: | |||
20 | 20 | ||
21 | SOPS_TYPES = frozenset({'kms', 'gcp_kms', 'azure_kv', 'hc_vault', 'age', 'pgp'}) | 21 | SOPS_TYPES = frozenset({'kms', 'gcp_kms', 'azure_kv', 'hc_vault', 'age', 'pgp'}) |
22 | 22 | ||
23 | BUFFER_SIZE = os.sysconf('SC_PAGESIZE') | ||
24 | |||
23 | 25 | ||
24 | def readnull(fh): | 26 | def readnull(fh): |
25 | buffer = b'' | 27 | buffer = b'' |
26 | 28 | ||
27 | while True: | 29 | while True: |
28 | chunk = fh.read(4096) | 30 | chunk = fh.read(BUFFER_SIZE) |
29 | buffer += chunk | 31 | buffer += chunk |
30 | if not buffer: | 32 | if not buffer: |
31 | break | 33 | break |