Пример #1
0
def get_link():
    random = randomString(20)
    if not id in S3Utils.get_events_id():
        rd = '/tmp/' + randomString(20) + '/'
        os.makedirs(rd)
        zf = zipfile.ZipFile(rd + 'archive-1.zip', mode='w')
        zf.close()
        S3Utils.addEmptyArch('archives/' + random + '/archive-1.zip',
                             rd + 'archive-1.zip')
        return random
    else:
        return get_link()
Пример #2
0
def exist(id):
    return (id in S3Utils.get_events_id())