Sort items before serializing to minimize diff

This commit is contained in:
Daniel Danner 2014-07-09 17:33:08 +02:00
parent 6854cd0ee3
commit 1769a68719

View File

@ -40,6 +40,7 @@ def serialize(tag, headers=(), items=()):
items if needed (ie. for calendars). items if needed (ie. for calendars).
""" """
items = sorted(items, key=lambda x: x.name)
if tag == "VADDRESSBOOK": if tag == "VADDRESSBOOK":
lines = [item.text for item in items] lines = [item.text for item in items]
else: else: