Oneiroi / clustercheck

Updated clustercheck, intended to be standalone service for the reporting of Percona XtraDB cluster nodes
GNU Affero General Public License v3.0
13 stars 15 forks source link

Use argparse instead of optparse #22

Closed toabctl closed 5 years ago

toabctl commented 5 years ago

optparse is deprecated[1] so use argparse.

[1] https://docs.python.org/3/library/optparse.html

toabctl commented 5 years ago

@Oneiroi any comments?

Oneiroi commented 5 years ago

@toabctl thank you for this PR, my comments are the tool has not at this time been ported to Python3 thus the deprecation (after 3.2 as I read the docs) it not relevant to this tool.

However I will agree with Python 2.x being deprecated from Jan 1 2020 this needs to move to Python 3 compatible and this change in that respect makes sense.

I'll need to carry out further testing to ensure compatibility, then will merge, thank you once again for this PR.

toabctl commented 5 years ago

@Oneiroi let me know if I can do anything else to move this forward. I think what would be really useful are unit and integration tests that could be executed via travis or so..

toabctl commented 5 years ago

rebased ...

toabctl commented 5 years ago

Oh. This rebase was wrong. So argparse is not used....

Oneiroi commented 5 years ago

Fixed in #29 thanks for that, my bad on merging this; I should've caught this discrepancy.