blob: fba0b7b3528abd1dc037d2c97cb6c7d70950ee85 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
"""Close a bug"""
from libbe import cmdutil
def execute(args):
"""
>>> from libbe import tests
>>> import os
>>> dir = tests.simple_bug_dir()
>>> os.chdir(dir.dir)
>>> dir.get_bug("a").status
'open'
>>> execute(("a",))
>>> dir.get_bug("a").status
'closed'
>>> tests.clean_up()
"""
assert(len(args) == 1)
bug = cmdutil.get_bug(args[0])
bug.status = "closed"
bug.save()
|