fix option propagation
This commit is contained in:
parent
7a4b17005a
commit
97503b7492
2 changed files with 5 additions and 5 deletions
2
cli/koji
2
cli/koji
|
|
@ -127,7 +127,7 @@ def get_options():
|
|||
parser.add_option("--password", help=_("specify password"))
|
||||
parser.add_option("--noauth", action="store_true", default=False,
|
||||
help=_("do not authenticate"))
|
||||
parser.add_option("--force-auth", action="store_true", default=False,
|
||||
parser.add_option("--force-auth", action="store_true", # default (False) comes from the config
|
||||
help=_("authenticate even for read-only operations"))
|
||||
parser.add_option("--authtype", help=_("force use of a type of authentication, options: "
|
||||
"noauth, ssl, password, or kerberos"))
|
||||
|
|
|
|||
|
|
@ -2146,12 +2146,12 @@ def handle_add_volume(goptions, session, args):
|
|||
print("Added volume %(name)s with id %(id)i" % volinfo)
|
||||
|
||||
|
||||
def anon_handle_list_volumes(options, session, args):
|
||||
def anon_handle_list_volumes(goptions, session, args):
|
||||
"[info] List storage volumes"
|
||||
usage = _("usage: %prog list-volumes")
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
(options, args) = parser.parse_args(args)
|
||||
ensure_connection(session, options)
|
||||
ensure_connection(session, goptions)
|
||||
for volinfo in session.listVolumes():
|
||||
print(volinfo['name'])
|
||||
|
||||
|
|
@ -7690,7 +7690,7 @@ _search_types = ('package', 'build', 'tag', 'target', 'user', 'host', 'rpm',
|
|||
'maven', 'win')
|
||||
|
||||
|
||||
def anon_handle_search(options, session, args):
|
||||
def anon_handle_search(goptions, session, args):
|
||||
"[search] Search the system"
|
||||
usage = _("usage: %prog search [options] <search_type> <pattern>")
|
||||
usage += _('\nAvailable search types: %s') % ', '.join(_search_types)
|
||||
|
|
@ -7711,7 +7711,7 @@ def anon_handle_search(options, session, args):
|
|||
matchType = 'regexp'
|
||||
elif options.exact:
|
||||
matchType = 'exact'
|
||||
ensure_connection(session, options)
|
||||
ensure_connection(session, goptions)
|
||||
data = session.search(pattern, type, matchType)
|
||||
for row in data:
|
||||
print(row['name'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue