mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-04-28 03:20:10 +00:00
16 lines
328 B
Python
16 lines
328 B
Python
import os
|
|
import random
|
|
import string
|
|
|
|
from seaserv import ccnet_api, seafile_api
|
|
|
|
|
|
def create_and_get_repo(*a, **kw):
|
|
repo_id = seafile_api.create_repo(*a, **kw)
|
|
repo = seafile_api.get_repo(repo_id)
|
|
return repo
|
|
|
|
|
|
def randstring(length=12):
|
|
return ''.join(random.choice(string.lowercase) for i in range(length))
|