On 08/25/2017 11:57 AM, Stefan Hajnoczi wrote: > Many scripts can benefit from the standard library argparse module, which has > improvements over the older optparse module. Unfortunately argparse was only > shipped in Python 2.7 so we need a fallback for Python 2.6. > > This patch series adds a copy of argparse.py and updates scripts as necessary > to import it. > > Stefan Hajnoczi (3): > scripts: add argparse module for Python 2.6 compatibility > docker.py: Python 2.6 argparse compatibility > tests: migration/guestperf Python 2.6 argparse compatibility > > COPYING.PYTHON | 270 ++++ > scripts/argparse.py | 2406 > ++++++++++++++++++++++++++++++++++++ > tests/docker/docker.py | 4 +- > tests/migration/guestperf/shell.py | 8 +- > 4 files changed, 2684 insertions(+), 4 deletions(-) > create mode 100644 COPYING.PYTHON > create mode 100644 scripts/argparse.py >
Acked-by: John Snow <js...@redhat.com> Seems sane to me, provided it actually works in those 2.6 contexts we wish it to...