예제 #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
예제 #2
0
파일: __init__.py 프로젝트: B-Rich/M2M
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
예제 #3
0
파일: __init__.py 프로젝트: HM2MC/Webfront
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