Mercurial > hg > gcmultimerge
changeset 60:37705c4a35e1
Show target calendar information in debug mode.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 06 Jul 2016 12:24:09 +0300 |
parents | a8941896c21c |
children | 9fe4faa80687 |
files | multimerge.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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