From 180638ac02637f38301eb97d15a8590293b3a3a4 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Mon, 18 Sep 2023 17:44:31 +0300 Subject: [PATCH] syscalls: refactor module hierarchy --- src/openpower/syscalls/.gitignore | 1 + src/openpower/syscalls/__init__.py | 0 src/openpower/syscalls/{lscmg.py => __main__.py} | 12 +++++------- 3 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 src/openpower/syscalls/.gitignore create mode 100644 src/openpower/syscalls/__init__.py rename src/openpower/syscalls/{lscmg.py => __main__.py} (93%) diff --git a/src/openpower/syscalls/.gitignore b/src/openpower/syscalls/.gitignore new file mode 100644 index 00000000..a6c57f5f --- /dev/null +++ b/src/openpower/syscalls/.gitignore @@ -0,0 +1 @@ +*.json diff --git a/src/openpower/syscalls/__init__.py b/src/openpower/syscalls/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/openpower/syscalls/lscmg.py b/src/openpower/syscalls/__main__.py similarity index 93% rename from src/openpower/syscalls/lscmg.py rename to src/openpower/syscalls/__main__.py index d5c69872..6cec7fb3 100644 --- a/src/openpower/syscalls/lscmg.py +++ b/src/openpower/syscalls/__main__.py @@ -1,7 +1,5 @@ import argparse import collections -import enum -import functools import json import os import pathlib @@ -77,11 +75,11 @@ def main(): tree = arguments.pop("tree") tree = tree.expanduser() - sysnums = dict(collect_sysnums(tree=tree)) - sysargs = dict(collect_sysargs(tree=tree)) - - print("SYSNUMS", "=", json.dumps(sysnums, indent=4)) - print("SYSARGS", "=", json.dumps(sysargs, indent=4)) + table = { + "sysnums": dict(collect_sysnums(tree=tree)), + "sysargs": dict(collect_sysargs(tree=tree)), + } + print(json.dumps(table, indent=4)) if __name__ == "__main__": -- 2.30.2