7 filename =
'crossfiremail.db'
8 path = os.path.join(Crossfire.LocalDirectory(), filename)
9 if os.path.isfile(path):
10 Crossfire.Log(Crossfire.LogInfo,
"Converting crossfiremail.db (BDB)")
11 import berkeleydb.dbshelve
as shelve
12 old_db = shelve.open(path,
'r')
13 for to
in old_db.keys():
15 toname = to.decode(
'ascii')
16 for (t, fromname, msg)
in allmail:
17 mail.send(t, toname, fromname, msg)
19 bak_file = os.path.join(Crossfire.LocalDirectory(), filename +
'.bak')
20 os.rename(path, bak_file)
23 Crossfire.Log(Crossfire.LogInfo,
"Initializing CFMail")