mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r26618: Implement -W option support.
(This used to be commit e48026b17d
)
This commit is contained in:
parent
0098543d67
commit
77c825f08b
@ -42,12 +42,18 @@ class CredentialsOptions(optparse.OptionGroup):
|
||||
help="Password", type=str, callback=self.set_password)
|
||||
self.add_option("-U", "--username", metavar="USERNAME",
|
||||
action="callback", type=str,
|
||||
help="username", callback=self.parse_username)
|
||||
help="Username", callback=self.parse_username)
|
||||
self.add_option("-W", "--workgroup", metavar="WORKGROUP",
|
||||
action="callback", type=str,
|
||||
help="Workgroup", callback=self.parse_workgroup)
|
||||
self.creds = Credentials()
|
||||
|
||||
def parse_username(self, option, opt_str, arg, parser):
|
||||
self.creds.parse_string(arg)
|
||||
|
||||
def parse_workgroup(self, option, opt_str, arg, parser):
|
||||
self.creds.set_domain(arg)
|
||||
|
||||
def set_password(self, option, opt_str, arg, parser):
|
||||
self.creds.set_password(arg)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user