sops: fix setting secret from pipe
All checks were successful
checks / checks-impure (pull_request) Successful in 2m12s
checks / checks (pull_request) Successful in 4m56s

This commit is contained in:
Jörg Thalheim 2024-04-30 14:04:49 +02:00
parent 5606101ce8
commit b5653c169b

View File

@ -1,3 +1,4 @@
import io
import json
import os
import shutil
@ -171,7 +172,7 @@ def encrypt_file(
elif isinstance(content, bytes):
with open(f.name, "wb") as fd:
fd.write(content)
elif isinstance(content, IO):
elif isinstance(content, io.IOBase):
with open(f.name, "w") as fd:
shutil.copyfileobj(content, fd)
else: