1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

python: getopt: rename SambaOption to Option

* Nothing uses SambaOption directly, everything imports it through samba.netcmd.Option
 * Avoid an unnecessary rename on import

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Rob van der Linde 2023-10-05 16:26:40 +13:00 committed by Andrew Bartlett
parent d54f52b847
commit f77064c822
2 changed files with 2 additions and 3 deletions

View File

@ -94,7 +94,7 @@ class Validator(metaclass=ABCMeta):
pass
class SambaOption(optparse.Option):
class Option(optparse.Option):
ATTRS = optparse.Option.ATTRS + ["validators"]
TYPES = optparse.Option.TYPES + ("bytes",)
TYPE_CHECKER = copy(optparse.Option.TYPE_CHECKER)

View File

@ -26,8 +26,7 @@ import samba
from ldb import ERR_INVALID_CREDENTIALS, LdbError
from samba import colour
from samba.auth import system_session
from samba.getopt import OptionError
from samba.getopt import SambaOption as Option
from samba.getopt import Option, OptionError
from samba.logger import get_samba_logger
from samba.samdb import SamDB