Nir Soffer has uploaded a new change for review. Change subject: remft: Add online help ......................................................................
remft: Add online help Example: $ contrib/refmt -h usage: refmt [-h] [file [file ...]] Reformat python literals positional arguments: file Files to reformat, nothing to process stdin optional arguments: -h, --help show this help message and exit Change-Id: I8babaf66a86f5b540ee2c07b639ac59f27d3ebfc Signed-off-by: Nir Soffer <nsof...@redhat.com> --- M contrib/refmt 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/68/60768/1 diff --git a/contrib/refmt b/contrib/refmt index fc59126..ba72666 100755 --- a/contrib/refmt +++ b/contrib/refmt @@ -60,12 +60,17 @@ # 'valid': True, # 'version': 3}} +import argparse import fileinput import pprint import sys def _main(): + parser = argparse.ArgumentParser(description='Reformat python literals') + parser.add_argument("file", nargs="*", + help="Files to reformat, nothing to process stdin") + parser.parse_args() for line in fileinput.input(): obj = eval(line) pprint.pprint(obj) -- To view, visit https://gerrit.ovirt.org/60768 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8babaf66a86f5b540ee2c07b639ac59f27d3ebfc Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <nsof...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org