assemblers: use api.arguments
Instead of reading the arguments from sys.stdin, which requires that stdin is setup properly for that in the runner, use the new api.arguments() method to directly fetch the arguments. Also fix missing newlines between imports and methods to be more PEP-8 complaint, where needed.
This commit is contained in:
parent
fc5e0070c5
commit
fc6e6285ca
5 changed files with 20 additions and 6 deletions
|
|
@ -21,12 +21,14 @@ read from `/proc/sys/kernel/random/uuid` if your kernel provides it.
|
|||
|
||||
|
||||
import contextlib
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
import osbuild.api
|
||||
import osbuild.remoteloop as remoteloop
|
||||
|
||||
|
||||
SCHEMA = """
|
||||
"additionalProperties": false,
|
||||
"required": ["filename", "root_fs_uuid", "size"],
|
||||
|
|
@ -104,6 +106,6 @@ def main(tree, output_dir, options, loop_client):
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = json.load(sys.stdin)
|
||||
args = osbuild.api.arguments()
|
||||
r = main(args["tree"], args["output_dir"], args["options"], remoteloop.LoopClient("/run/osbuild/api/remoteloop"))
|
||||
sys.exit(r)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue