コード例 #1
0
ファイル: interactive.py プロジェクト: colloquium/spacewalk
 def do_query(self, line):
     from smart.commands import query
     try:
         try:
             opts = query.parse_options(shlex.split(line))
         except ValueError, e:
             raise Error, str(e)
         query.main(self._ctrl, opts, reloadchannels=False)
コード例 #2
0
 def do_query(self, line):
     from smart.commands import query
     try:
         try:
             opts = query.parse_options(shlex.split(line))
         except ValueError, e:
             raise Error, str(e)
         query.main(self._ctrl, opts, reloadchannels=False)
コード例 #3
0
ファイル: search.py プロジェクト: pombredanne/spacewalk
def parse_options(argv):
    opts = query.parse_options(argv, help=HELP)
    opts.name = opts.args
    opts.summary = opts.args
    opts.description = opts.args
    for arg in argv:
        if ":/" in arg:
            opts.url.append(arg)
        elif "/" in arg:
            opts.path.append(arg)
    opts.show_summary = True
    opts.hide_version = True
    opts.args = []
    return opts
コード例 #4
0
def parse_options(argv):
    opts = query.parse_options(argv, usage=USAGE, \
                               description=DESCRIPTION, examples=EXAMPLES)
    opts.name = opts.args
    opts.summary = opts.args
    opts.description = opts.args
    for arg in argv:
        if ":/" in arg:
            opts.url.append(arg)
        elif "/" in arg:
            opts.path.append(arg)
    opts.show_summary = True
    opts.hide_version = True
    opts.args = []
    return opts
コード例 #5
0
ファイル: search.py プロジェクト: bluelightning/smart
def parse_options(argv):
    opts = query.parse_options(argv, usage=USAGE, \
                               description=DESCRIPTION, examples=EXAMPLES)
    opts.name = opts.args
    opts.summary = opts.args
    opts.description = opts.args
    for arg in argv:
        if ":/" in arg:
            opts.url.append(arg)
        elif "/" in arg:
            opts.path.append(arg)
    opts.show_summary = True
    opts.hide_version = True
    opts.args = []
    return opts
コード例 #6
0
ファイル: search.py プロジェクト: lufengwei2010/AG35
def parse_options(argv):
    opts = query.parse_options(argv, usage=USAGE, \
                               description=DESCRIPTION, examples=EXAMPLES)
    if not argv:
        raise Error, _("Search expression not specified")
    opts.name = opts.args
    opts.summary = opts.args
    opts.description = opts.args
    for arg in argv:
        if ":/" in arg:
            opts.url.append(arg)
        elif "/" in arg:
            opts.path.append(arg)
    opts.show_summary = True
    opts.hide_version = True
    opts.args = []
    return opts