summaryrefslogtreecommitdiff
path: root/tools/sops-inventory/sops_inventory
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2023-04-09 19:57:41 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2023-04-09 19:57:41 +0200
commit24207674f36e900fd2aa51787cb70756413962c2 (patch)
treef254d40b32d918783ae7698b902792963464269d /tools/sops-inventory/sops_inventory
parent9c67ce4623ae1f2bf9a9d71de781c12054c1001c (diff)
downloadnixos-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')
-rw-r--r--tools/sops-inventory/sops_inventory/__main__.py4
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
21SOPS_TYPES = frozenset({'kms', 'gcp_kms', 'azure_kv', 'hc_vault', 'age', 'pgp'}) 21SOPS_TYPES = frozenset({'kms', 'gcp_kms', 'azure_kv', 'hc_vault', 'age', 'pgp'})
22 22
23BUFFER_SIZE = os.sysconf('SC_PAGESIZE')
24
23 25
24def readnull(fh): 26def 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