|
|
@ -34,10 +34,15 @@ _log = logging.getLogger('mitterlib.network.Network') |
|
|
|
|
|
|
|
|
|
|
|
def auth_options(namespace, options, auths): |
|
|
|
def auth_options(namespace, options, auths): |
|
|
|
"""Convert the auth fields into options for the command line.""" |
|
|
|
"""Convert the auth fields into options for the command line.""" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
default_values = { |
|
|
|
|
|
|
|
'str': '', |
|
|
|
|
|
|
|
'passwd': ''} |
|
|
|
|
|
|
|
|
|
|
|
for option in auths: |
|
|
|
for option in auths: |
|
|
|
options.add_option(group=namespace, |
|
|
|
options.add_option(group=namespace, |
|
|
|
option=option['name'], |
|
|
|
option=option['name'], |
|
|
|
default=None, |
|
|
|
default=default_values[option['type']], |
|
|
|
help=option['help'], |
|
|
|
help=option['help'], |
|
|
|
*(option['flags'])) |
|
|
|
*(option['flags'])) |
|
|
|
#-------------------------------------------------------------------- |
|
|
|
#-------------------------------------------------------------------- |
|
|
|