diff options
author | Jose M. Guisado <jguisado@soleta.eu> | 2022-02-24 10:11:40 +0100 |
---|---|---|
committer | Jose M. Guisado Gomez <guigom@riseup.net> | 2022-05-10 16:19:17 +0200 |
commit | 5c1137662e3f5c6c0793b038944853b43c391239 (patch) | |
tree | 2f3d05e4015d9a761d72938a25b0c9db3ea33bc3 /cli/cli.py | |
parent | 0f2d1f1dba4a91ef7c0c7104e1995ae8d2cba576 (diff) |
Fix --help
Non-method attributes are shown using dir() when listing available
commands.
usage: ogcli [-h] [{create,list,restore,rest,send,set,setup}]
'rest' is a class instance of OgRest and must not be
shown when listing available commands.
Method members of OgCLI class are the available commands that ogcli can
execute.
Use inspect module in order to get class members (getmembers) and filter
only those that are a method (ismethod).
usage: ogcli [-h] [{create,list,restore,send,set,setup}]
Fixes: 0f2d1f1dba4 ("Show all valid commands when running ogcli --help")
Diffstat (limited to 'cli/cli.py')
0 files changed, 0 insertions, 0 deletions