Skip to content

Commit

Permalink
Better error message for malformed items
Browse files Browse the repository at this point in the history
See #290
  • Loading branch information
untitaker committed Nov 5, 2015
1 parent ffadca3 commit 5468428
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vdirsyncer/repair.py
Expand Up @@ -35,7 +35,12 @@ def repair_storage(storage):
changed = change_uid(item, generate_href(item.uid)) or changed

new_item = Item(u'\r\n'.join(item.parsed.dump_lines()))
assert new_item.uid
if not new_item.uid:
logger.error('Item {r!} is completely malformed. '
'This is a serverside bug.'
.format(href))
continue

seen_uids.add(new_item.uid)
if changed:
try:
Expand Down

0 comments on commit 5468428

Please sign in to comment.