# Copyright 2005 James Bunton <james@delx.cjb.net>
# Licensed for distribution under the GPL version 2, check COPYING for details
+import tlib.xmlw
+
import utils
import config
import xdb
-if(utils.checkTwisted()):
- from twisted.words.protocols.jabber import jid
-else:
- from tlib.jabber import jid
import shutil
import os
f = open(self.filename, "r")
self.notes = [x.strip() for x in f.readlines()]
f.close()
- elif not os.path.exists(pre):
+ else:
+ if not os.path.exists(pre):
+ os.makedirs(pre)
global noteList
self.notes = noteList
- os.makedirs(pre)
def check(self, note):
return self.notes.count(note) == 0
for file in os.listdir(pre):
try:
file = xdb.unmangle(file).decode("utf-8")
- filej = jid.JID(file).full()
+ filej = xmlw.jid.intern(file).full()
if(file != filej):
file = xdb.mangle(file)
filej = xdb.mangle(filej)