print "You must install pycrypto and pyopenssl."
raise
from twisted.python import failure, log
+from twisted.words.xish.domish import parseText, unescapeFromXml
-# Compat stuff
-from tlib import xmlw
# System imports
import types, operator, os, sys, base64, random, struct, random, sha, base64, StringIO, array, codecs, binascii
self.text = '<msnobj Creator="%s" Size="%s" Type="%s" Location="%s" Friendly="%s" SHA1D="%s" SHA1C="%s"/>' % (self.creator, str(self.size), str(self.type), self.location, self.friendly, self.sha1d, sha1c)
def parse(self, s):
- e = xmlw.parseText(s, True)
+ e = parseText(s, True)
if not e:
return # Parse failed
self.creator = e.getAttribute("Creator")
self.gotRealtimeEmailNotification(mailfrom, fromaddr, subject)
def _gotMSNAlert(self, message):
- notification = xmlw.parseText(message.message, beExtremelyLenient=True)
+ notification = parseText(message.message, beExtremelyLenient=True)
siteurl = notification.getAttribute("siteurl")
notid = notification.getAttribute("id")
p1 = lm.find("<psm>") + 5
p2 = lm.find("</psm>")
if p1 >= 0 and p2 >= 0:
- personal = xmlw.unescapeFromXml(message.message[p1:p2])
+ personal = unescapeFromXml(message.message[p1:p2])
msnContact.personal = personal
self.contactPersonalChanged(message.userHandle, personal)
else: