Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem ====================== Python module argparse is used in a wrong way. On rhel 6 machines, this leads to ugly warning being displayed every time gdeploy command is run. Version-Release number of selected component (if applicable) ============================================================ gdeploy-1.0-12.el6rhs.noarch python-2.6.6-64.el6.x86_64 python-argparse-1.2.1-2.1.el6.noarch How reproducible ================ 100 % Steps to Reproduce ================== On RHEL 6 Gluster Storage Server machnie, try to use gdeploy tool, eg: * gdeploy -h * gdeploy --version Actual results ============== Python module argparse complains about wrong usage of it's api: ~~~ # gdeploy -h /usr/lib/python2.6/site-packages/argparse.py:1575: DeprecationWarning: The "version" argument to ArgumentParser is deprecated. Please use "add_argument(..., action='version', version="N", ...)" instead """instead""", DeprecationWarning) usage: gdeploy [-h] [-v] [-vv] [-c CONFIG_FILE] [-k] [volumeset <hostIP>:<volumename> <key> <value>] positional arguments: volumeset Set options for the volume optional arguments: -h, --help show this help message and exit -v, --version show program's version number and exit -c CONFIG_FILE Configuration file -k Keep the generated ansible utility files -vv verbose mode ~~~ ~~~ # gdeploy --version /usr/lib/python2.6/site-packages/argparse.py:1575: DeprecationWarning: The "version" argument to ArgumentParser is deprecated. Please use "add_argument(..., action='version', version="N", ...)" instead """instead""", DeprecationWarning) 1.0 ~~~ Expected results ================ Python module argparse doesn't complain. So for example: ~~~ # gdeploy --version gdeploy 1.0 ~~~
See proposed fix: https://github.com/gluster/gdeploy/pull/25
Merged into gdeploy-1.1
Verified with gdeploy-2.0-2.el6rhs.noarch
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2016:1250