Ejemplo n.º 1
0
def clean_slate(candidate):
    candidate.remove_problems()
    try:
        pset = candidate.path.hid.problems
    except:
        pset = ProblemSet()
        pset.host = candidate.path.hid
        pset.save()
    return pset
Ejemplo n.º 2
0
def clean_slate(candidate):
    candidate.remove_problems()
    try:
        pset = candidate.path.hid.problems
    except:
        pset = ProblemSet()
        pset.host = candidate.path.hid
        pset.save()
    return pset
Ejemplo n.º 3
0
def clean_slate(candidate):
    candidate.remove_problems()
    try:
        pset = candidate.path.hid.problems
    except Exception, e:
        try:
            pset = ProblemSet()
            pset.host = candidate.path.hid
            pset.save()
        except:
            candidate.delete()
            return None