piknik

Unnamed repository; edit this file 'description' to name the repository.
Info | Log | Files | Refs | README | LICENSE

commit 3d7919cd65989570cc65153a106004c25adea3d6
parent d076f1deea0cea20a88de26bedec9f0a00b07a3b
Author: lash <dev@holbrook.no>
Date:   Tue, 21 Mar 2023 10:19:19 +0000

Add main entry point for master script

Diffstat:
Mpiknik/runnable/cmd.py | 10++++++++--
Msetup.cfg | 1+
2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/piknik/runnable/cmd.py b/piknik/runnable/cmd.py @@ -17,7 +17,7 @@ from piknik.cli.mod import subparser as subparser_mod from piknik.cli.add import subparser as subparser_add from piknik.cli.comment import subparser as subparser_comment -logging.basicConfig(level=logging.DEBUG) +logging.basicConfig(level=logging.WARNING) logg = logging.getLogger() argp = argparse.ArgumentParser() @@ -55,5 +55,11 @@ arg = argp.parse_args(sys.argv[1:]) m.ctx = Context(arg, m.assembler) -if __name__ == '__main__': + +def main(): + global m m.main() + + +if __name__ == '__main__': + main() diff --git a/setup.cfg b/setup.cfg @@ -29,6 +29,7 @@ include_package_data = True python_requires = >= 3.7 packages = piknik + piknik.cli piknik.store piknik.render piknik.runnable