libbe.command.severity

class libbe.command.severity.Severity(*args, **kwargs)

Change a bug’s severity level

>>> 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_bugdir(bd)
>>> cmd = Severity(ui=ui)
>>> bd.bug_from_uuid('a').severity
'minor'
>>> ret = ui.run(cmd, args=['wishlist', '/a'])
>>> bd.flush_reload()
>>> bd.bug_from_uuid('a').severity
'wishlist'
>>> ret = ui.run(cmd, args=['none', '/a'])
Traceback (most recent call last):
UserError: Invalid severity level: none
>>> ui.cleanup()
>>> bd.cleanup()

Methods

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

This Page