# HG changeset patch # User Matti Hamalainen # Date 1467797049 -10800 # Node ID 37705c4a35e1b6d3d4951405276770fde3d7775a # Parent a8941896c21c54e292f9168b6f927cf586d03838 Show target calendar information in debug mode. diff -r a8941896c21c -r 37705c4a35e1 multimerge.py --- a/multimerge.py Wed Jul 06 00:55:46 2016 +0300 +++ b/multimerge.py Wed Jul 06 12:24:09 2016 +0300 @@ -382,11 +382,13 @@ ## Filter desired SOURCE calendars based on specified regexp src_re = re.compile(cfg.source_regex, re.UNICODE) src_calendars = [] +dst_calendar = None for calendar in calendars: if u"summary" in calendar: # Find destination calendar ID if not set if not cfg.dest_id and cfg.dest_name == calendar["summary"].strip(): cfg.mset("dest_id", calendar["id"]) + dst_calendar = calendar # If summary or summaryOverride match the regexp, add calendar mre = src_re.match(calendar["summary"]) @@ -402,8 +404,10 @@ ## Check if we have destination calendar ID -if not cfg.dest_id: +if not dst_calendar: gcm_fatal(u"Could not find target/destination calendar ID for '"+ cfg.dest_name +"'.") +else: + gcm_debug(u"Target calendar '{0}' id {1}.".format(dst_calendar["summary"], dst_calendar["id"])) ## Now, we fetch and collect events