summaryrefslogtreecommitdiff
path: root/Biz/Que
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Que')
-rw-r--r--Biz/Que/Client.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/Biz/Que/Client.py b/Biz/Que/Client.py
index 9620c5e..ccbb980 100644
--- a/Biz/Que/Client.py
+++ b/Biz/Que/Client.py
@@ -215,21 +215,26 @@ def get_args() -> argparse.Namespace:
return cli.parse_args()
-if __name__ == "__main__":
- ARGV = get_args()
- if ARGV.test:
+def main() -> None:
+ """Entrypoint."""
+ argv = get_args()
+ if argv.test:
sys.stdout.write("ok\n")
sys.exit()
- if ARGV.debug:
+ if argv.debug:
logging.basicConfig(
format="%(asctime)s: %(levelname)s: %(message)s",
level=logging.DEBUG,
datefmt="%Y.%m.%d..%H.%M.%S",
)
try:
- if ARGV.infile:
- send(ARGV)
+ if argv.infile:
+ send(argv)
else:
- recv(ARGV)
+ recv(argv)
except KeyboardInterrupt:
sys.exit(0)
+
+
+if __name__ == "__main__":
+ main()