libbe.command.target
¶
-
class
libbe.command.target.
Target
(*args, **kwargs)¶ Assorted bug target manipulations and queries
>>> import os, StringIO, sys >>> import libbe.bugdir >>> bd = libbe.bugdir.SimpleBugDir(memory=False) >>> io = libbe.command.StringInputOutput() >>> io.stdout = sys.stdout >>> ui = libbe.command.UserInterface(io=io) >>> ui.storage_callbacks.set_storage(bd.storage) >>> cmd = Target(ui=ui)
>>> ret = ui.run(cmd, args=['/a']) No target assigned. >>> ret = ui.run(cmd, args=['/a', 'tomorrow']) >>> ret = ui.run(cmd, args=['/a']) tomorrow
>>> ui.io.stdout = StringIO.StringIO() >>> ret = ui.run(cmd, {'resolve':True}, ['tomorrow']) >>> output = ui.io.get_stdout().strip() >>> bd.flush_reload() >>> target = bd.bug_from_uuid(output) >>> print target.summary tomorrow >>> print target.severity target
>>> ui.io.stdout = sys.stdout >>> ret = ui.run(cmd, args=['/a', 'none']) >>> ret = ui.run(cmd, args=['/a']) No target assigned. >>> ui.cleanup() >>> bd.cleanup()
Methods
cleanup
()complete
([argument, fragment])help
(*args)run
([options, args])usage
()-
name
= 'target'¶
-
usage
()¶
-
-
libbe.command.target.
add_target
(bugdirs, bugdir, bug, summary)¶
-
libbe.command.target.
bug_from_target_summary
(bugdirs, bugdir, summary=None)¶
-
libbe.command.target.
bug_target
(bugdirs, bug)¶
-
libbe.command.target.
complete_target
(command, argument, fragment=None)¶ List possible command completions for fragment.
-
libbe.command.target.
remove_target
(bugdirs, bug)¶
-
libbe.command.target.
target_dict
(bugdirs)¶ Return a dict with bug UUID keys and bug summary values for all target bugs.
-
libbe.command.target.
targets
(bugdirs)¶ Generate all possible target bug summaries.