Mercurial > hg > gcmultimerge
comparison multimerge.py @ 133:3a3958edc813
Check that the "summary" attribute exists.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 26 Aug 2020 11:59:45 +0300 |
parents | 16404eaf35df |
children | afdef805e9b7 |
comparison
equal
deleted
inserted
replaced
132:16404eaf35df | 133:3a3958edc813 |
---|---|
602 for event in events: | 602 for event in events: |
603 # Set summary and color for existing events | 603 # Set summary and color for existing events |
604 if event["status"] != u"cancelled": | 604 if event["status"] != u"cancelled": |
605 if c_found != None: | 605 if c_found != None: |
606 event["colorId"] = c_found | 606 event["colorId"] = c_found |
607 event["summary"] = u"[{1}] {0}".format(event["summary"], calendar["gcm_id"]) | 607 if "summary" in event: |
608 event["summary"] = u"[{1}] {0}".format(event["summary"], calendar["gcm_id"]) | |
609 else: | |
610 event["summary"] = u"[?] {0}".format(calendar["gcm_id"]) | |
608 | 611 |
609 # Add to list of source events | 612 # Add to list of source events |
610 src_events.extend(events) | 613 src_events.extend(events) |
611 if gcm_check_debug(4): | 614 if gcm_check_debug(4): |
612 gcm_dump_events(events, (lambda ev: ev["status"] != u"cancelled")) | 615 gcm_dump_events(events, (lambda ev: ev["status"] != u"cancelled")) |