From 3a1cbc4d5063344c3e3a4bf510d651a36beedfb3 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Wed, 5 Feb 2020 22:26:47 -0800 Subject: [PATCH] move info class to top --- jc/cli.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/jc/cli.py b/jc/cli.py index 3594f24c..526e1bb2 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -9,6 +9,16 @@ import signal import json import jc.utils + +class info(): + version = '1.7.1' + description = 'jc cli output JSON conversion tool' + author = 'Kelly Brazil' + author_email = 'kellyjonbrazil@gmail.com' + + +__version__ = info.version + parsers = [ 'arp', 'crontab', @@ -50,6 +60,10 @@ parsers = [ ] +def ctrlc(signum, frame): + sys.exit(1) + + def parser_shortname(parser_argument): """short name of the parser with dashes and no -- prefix""" return parser_argument[2:] @@ -71,20 +85,6 @@ def parser_module(parser): return getattr(jc.parsers, parser_mod_shortname(parser)) -class info(): - version = '1.7.1' - description = 'jc cli output JSON conversion tool' - author = 'Kelly Brazil' - author_email = 'kellyjonbrazil@gmail.com' - - -__version__ = info.version - - -def ctrlc(signum, frame): - sys.exit(1) - - def parsers_text(indent=0, pad=0): ptext = '' for parser in parsers: