tools/kvm_stat: switch to argparse
authorStefan Raspl <raspl@de.ibm.com>
Fri, 6 Mar 2020 11:42:45 +0000 (12:42 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 23 Mar 2020 19:44:20 +0000 (15:44 -0400)
commit0e6618fba8c98223e17d57d68b7b834e1eb89612
tree7c341d89cfb6aeab6b4e806cb6c1a768a4452c74
parenteecda7a95646a4590ea02545d15d73cdcdf8beb1
tools/kvm_stat: switch to argparse

optparse is deprecated for a while, hence switching over to argparse
(which also works with python2).
As a consequence, help output has some subtle changes, the most
significant one being that the options are all listed explicitly
instead of a universal '[options]' indicator. Also, some of the error
messages are phrased slightly different.
While at it, squashed a number of minor PEP8 issues.

Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
Message-Id: <20200306114250.57585-3-raspl@linux.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/kvm/kvm_stat/kvm_stat