assemblers/tar: use osbuild.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
ba94409d23
commit
61966e3f4c
1 changed files with 5 additions and 2 deletions
|
|
@ -19,10 +19,12 @@ Buildhost commands used: `tar` and any named `compression` program.
|
|||
"""
|
||||
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
import osbuild.api
|
||||
|
||||
|
||||
SCHEMA = """
|
||||
"additionalProperties": false,
|
||||
"required": ["filename"],
|
||||
|
|
@ -39,6 +41,7 @@ SCHEMA = """
|
|||
}
|
||||
"""
|
||||
|
||||
|
||||
def main(tree, output_dir, options):
|
||||
filename = options["filename"]
|
||||
compression = options.get("compression")
|
||||
|
|
@ -76,6 +79,6 @@ def main(tree, output_dir, options):
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = json.load(sys.stdin)
|
||||
args = osbuild.api.arguments()
|
||||
r = main(args["tree"], args["output_dir"], args["options"])
|
||||
sys.exit(r)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue