summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorGary Lockyer <gary@catalyst.net.nz>2019-06-21 13:12:01 +1200
committerGary Lockyer <gary@samba.org>2019-07-02 02:23:08 +0000
commit4644416a92179f1f44ebcce90be1a058da4b3b30 (patch)
tree154b898fc073db25973bfd4e4f9656163f0fa2ef /python
parentb8446c080254053b63dbb8aca7d5332e044a9c93 (diff)
downloadsamba-4644416a92179f1f44ebcce90be1a058da4b3b30.tar.gz
samba-tool: Make the 'bytes' option type avaiable
Allow samba tool to use the custom bytes option type. 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>
Diffstat (limited to 'python')
-rw-r--r--python/samba/netcmd/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/samba/netcmd/__init__.py b/python/samba/netcmd/__init__.py
index 54e9107005a..57df46343e9 100644
--- a/python/samba/netcmd/__init__.py
+++ b/python/samba/netcmd/__init__.py
@@ -19,6 +19,7 @@
import optparse
import samba
from samba import colour
+from samba.getopt import SambaOption
from samba.logger import get_samba_logger
from ldb import LdbError
import sys
@@ -26,7 +27,7 @@ import traceback
import textwrap
-class Option(optparse.Option):
+class Option(SambaOption):
SUPPRESS_HELP = optparse.SUPPRESS_HELP
pass