eccf14efd0
Monotone-Parent: 027083e4ddfcc14898e7dd8b6e08c73058f18778 Monotone-Revision: 1475912d0e20ad5f1180b0921306270039272161 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2010-07-22T15:13:09 Monotone-Branch: ca.inverse.sogo
25 lines
674 B
Python
Executable file
25 lines
674 B
Python
Executable file
#!/usr/bin/python
|
|
|
|
import sys
|
|
import MySQLdb
|
|
|
|
import TurbaConverter
|
|
|
|
from config import webdavConfig, dbConfig
|
|
|
|
if __name__ == "__main__":
|
|
if len(sys.argv) > 1:
|
|
user = sys.argv[1]
|
|
else:
|
|
raise Exception, "<user> argument must be specified" \
|
|
" (use 'ALL' for everyone)"
|
|
|
|
conn = MySQLdb.connect(host = dbConfig["hostname"],
|
|
user = dbConfig["username"],
|
|
passwd = dbConfig["password"],
|
|
db = dbConfig["database"],
|
|
use_unicode = True)
|
|
cnv = TurbaConverter.TurbaConverter(user, webdavConfig)
|
|
cnv.start(conn)
|
|
conn.close()
|