birthday import error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Dexter - Old |
New
|
Undecided
|
Unassigned |
Bug Description
Dexter crashed while importing a vcard file (originally created by kaddressbook):
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib64/
self.run()
File "/usr/lib/
import_
File "/usr/lib/
first_name = card.n.
AttributeError: 'list' object has no attribute 'strip'
Traceback (most recent call last):
File "/usr/lib/
item[8], item[9], item[10])
File "/usr/lib/
return self._proxy_
File "/usr/lib/
**keywords)
File "/usr/lib/
message, timeout)
dbus.exceptions
File "/usr/lib/
retval = candidate_
File "/usr/bin/
phones, addresses, imnicks, notes, self.store)
File "/usr/lib/
int(
ValueError: invalid literal for int() with base 10: '01T00:00:00Z'
This is a date format I've seen before. I don't know whether it is a valid date format for vcards but it's probably a good idea in any case to check the data to see if it's a number (s.isdigit()) before passing to int() (or at least catch the exception). I don't know if a time is useful with a birthday so it might be okay to just strip the time off starting with the T.