python getopt: Add bytes option type
authorGary Lockyer <gary@catalyst.net.nz>
Fri, 21 Jun 2019 01:05:23 +0000 (13:05 +1200)
committerGary Lockyer <gary@samba.org>
Tue, 2 Jul 2019 02:23:08 +0000 (02:23 +0000)
commitb8446c080254053b63dbb8aca7d5332e044a9c93
treee2a2dfb31c223ce69cef5a043d9de13803be1a9f
parentb27817d491794a292278832e3f59f955f418a6cb
python getopt: Add bytes option type

Add a new option type to the python command line options.
  Option("--size", type="bytes", metavar="SIZE")
To allow the input of file and memory sizes using unit suffixes i.e.
2Gb, 4KiB ...

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/getopt.py