Index: /home/heikki/workspace/chandler/parcels/osaf/pim/mail.py
===================================================================
--- /home/heikki/workspace/chandler/parcels/osaf/pim/mail.py (revision 14809)
+++ /home/heikki/workspace/chandler/parcels/osaf/pim/mail.py (working copy)
@@ -2135,10 +2135,10 @@
return re.match("^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$", self.emailAddress) is not None
def getShortenedDisplayAddress(self, stringCanFit):
- address = self.__str__()
+ address = unicode(self)
# do the dumb thing -- just take the last char off
- while not stringCanFit(address) and len(address) > 0:
- address = address[0:len(address)-1]
+ while address and not stringCanFit(address):
+ address = address[:-1]
return address
@classmethod