aboutsummaryrefslogblamecommitdiffstats
path: root/becommands/open.py
blob: 82d739b89efbc22bb0d4dd430af889caa52c94d6 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
                   

                         











                                    
                          

                                  
              
"""Re-open 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("b").status
    'closed'
    >>> execute(("b",))
    >>> dir.get_bug("b").status
    'open'
    >>> tests.clean_up()
    """
    assert(len(args) == 1)
    bug = cmdutil.get_bug(args[0])
    bug.status = "open"
    bug.save()