Exemple #1
0
def checkrest(rest):
    fname = traceback.extract_stack()[-2][2]
    i = 0
    while True:
        if i == 0:
            filename = '%s.txt' % (fname,)
        else:
            filename = '%s_%s.txt' % (fname, i)
        tempfile = tempdir.join(filename)
        if not tempfile.check():
            break
        i += 1
    tempfile.write(rest)
    restcheck(tempfile)
    return tempfile.new(ext='.html').read()
Exemple #2
0
def checkrest(rest):
    fname = traceback.extract_stack()[-2][2]
    i = 0
    while True:
        if i == 0:
            filename = '%s.txt' % (fname, )
        else:
            filename = '%s_%s.txt' % (fname, i)
        tempfile = tempdir.join(filename)
        if not tempfile.check():
            break
        i += 1
    tempfile.write(rest)
    restcheck(tempfile)
    return tempfile.new(ext='.html').read()
Exemple #3
0
def checkrest(rest, filename):
    tempfile = tempdir.join(filename)
    tempfile.write(rest)
    restcheck(tempfile)
    return tempfile.new(ext='.html').read()
Exemple #4
0
def checkrest(rest, filename):
    tempfile = tempdir.join(filename)
    tempfile.write(rest)
    restcheck(tempfile)
    return tempfile.new(ext='.html').read()