示例#1
0
文件: util.py 项目: tv42/oatmail
def maketemp():
    tmp = os.path.join(os.path.dirname(__file__), 'tmp')
    mkdir(tmp)

    name = find_test_name()
    tmp = os.path.join(tmp, name)
    try:
        shutil.rmtree(tmp)
    except OSError, e:
        if e.errno == errno.ENOENT:
            pass
        else:
            raise
示例#2
0
文件: maildir.py 项目: tv42/oatmail
def create(path):
    mkdir(path, 0700)
    mkdir(os.path.join(path, 'new'), 0700)
    mkdir(os.path.join(path, 'cur'), 0700)
    mkdir(os.path.join(path, 'tmp'), 0700)