# public accessors -----------------
def add_url(self, url):
- if not isinstance(url, basestring):
- print url
- raise Exception('Not valid to add non-string URLs')
- self._add('url', url)
+ if url:
+ if not isinstance(url, basestring):
+ print url
+ raise Exception('Not valid to add non-string URLs')
+ self._add('url', url)
def add_phone(self, phone):
- self._add('phone', phone)
+ if phone:
+ self._add('phone', phone)
def get_birthday_date(self):
return self._safe_get('bday')