libbe.command.remove

class libbe.command.remove.Remove(*args, **kwargs)

Remove (delete) a bug and its comments

>>> import 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 = Remove(ui=ui)
>>> print bd.bug_from_uuid('b').status
closed
>>> ret = ui.run(cmd, args=['/b'])
Removed bug abc/b
>>> bd.flush_reload()
>>> try:
...     bd.bug_from_uuid('b')
... except libbe.bugdir.NoBugMatches:
...     print 'Bug not found'
Bug not found
>>> ui.cleanup()
>>> bd.cleanup()

Methods

cleanup()
complete([argument, fragment])
help(*args)
run([options, args])
usage()
name = 'remove'

This Page