Skip to content

Commit

Permalink
it's possible to be too old.
Browse files Browse the repository at this point in the history
git-svn-id: https://jerakeen.org/svn/tomi/Projects/Shelf@3842 ab05c693-d3d1-0310-8e8b-e1346d90d6a5
  • Loading branch information
tomi committed Feb 14, 2008
1 parent a34c9f9 commit 831a3e2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Clue.py
Expand Up @@ -234,8 +234,11 @@ def email(self):
return self.emails()[0]

def birthday(self):
if self.person.valueForProperty_( kABBirthdayProperty ):
return gmtime( self.person.valueForProperty_( kABBirthdayProperty ).timeIntervalSince1970() )
try:
if self.person.valueForProperty_( kABBirthdayProperty ):
return gmtime( self.person.valueForProperty_( kABBirthdayProperty ).timeIntervalSince1970() )
except ValueError: # too old.. TODO - Um, I know people born <1970. Must fix.
pass
return None

# utility method for dealing with the Cocoa Address Book interface.
Expand Down

0 comments on commit 831a3e2

Please sign in to comment.