From f47c8f31d9dff5a34ac2ead3fc96e0d04aafe2c2 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Wed, 14 Apr 2021 23:14:23 +0300 Subject: [PATCH] Fix the version flag. Forgot to exit after printing the version. Without a TTY it would exit anyway, but in an interactive console it hangs. --- template/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/template/__init__.py b/template/__init__.py index 87aab82..7fb7c5d 100644 --- a/template/__init__.py +++ b/template/__init__.py @@ -62,6 +62,7 @@ def main(): args = parser.parse_args() if args.version: print("Template version {}.".format(__version__)) + sys.exit() infd = args.filename if args.filename else sys.stdin outfd = args.output if args.output else sys.stdout print(render(infd.read()), file=outfd) -- GitLab