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.
28 lines
496 B
Python
Executable file
28 lines
496 B
Python
Executable file
#!/usr/bin/python3
|
|
"""
|
|
No-op assembler
|
|
|
|
No-op assembler. Produces no output, just prints a JSON dump of its options
|
|
and then exits.
|
|
"""
|
|
|
|
|
|
import json
|
|
import sys
|
|
|
|
import osbuild.api
|
|
|
|
|
|
SCHEMA = """
|
|
"additionalProperties": false
|
|
"""
|
|
|
|
|
|
def main(_tree, _output_dir, options):
|
|
print("Not doing anything with these options:", json.dumps(options))
|
|
|
|
|
|
if __name__ == '__main__':
|
|
args = osbuild.api.arguments()
|
|
r = main(args["tree"], args["output_dir"], args.get("options", {}))
|
|
sys.exit(r)
|