[chirp_devel] [PATCH 5/9] Refactor version display into chirp module (#2343)
Dan Smith
Wed Feb 25 08:32:12 PST 2015
> +class VersionAction(argparse.Action):
> + def __call__(self, parser, namespace, value, option_string=None):
> + args = (CHIRP_VERSION,
> + platform.get_platform().os_version_string(),
> + sys.version.split()[0])
> + print "CHIRP %s on %s (Python %s)" % args
> + sys.exit(1)
It's not okay, IMHO, to exit() from a library call.
Overall, I don't think it's worth having a separate module for just this
little thing. I'd just put it in __init__.py, or in chirp_common.
--Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20150225/e7e87349/attachment-0001.bin
More information about the chirp_devel
mailing list