changeset 50:f8618bae162a

Improve debug messages and comments.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 05 Jul 2016 18:01:11 +0300
parents cc30383f5f0d
children 54644b29a9a3
files multimerge.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/multimerge.py	Tue Jul 05 18:00:59 2016 +0300
+++ b/multimerge.py	Tue Jul 05 18:01:11 2016 +0300
@@ -357,12 +357,15 @@
 if len(calendars) == 0:
     gcm_fatal("No calendars found?")
 
+gcm_debug(u"{0} calendars total found.".format(len(calendars)))
+
 
 ## Filter desired SOURCE calendars based on specified regexp
 src_re = re.compile(cfg.source_regex, re.UNICODE)
 src_calendars = []
 for calendar in calendars:
     if "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"])
 
@@ -372,8 +375,10 @@
             calendar["gcm_id"] = mre.group(cfg.source_regmap[1])
             src_calendars.append(calendar)
 
+gcm_debug(u"{0} source calendars found.".format(len(src_calendars)))
 
-## Check if we have target ID
+
+## Check if we have destination calendar ID
 if not cfg.dest_id:
     gcm_fatal(u"Could not find target/destination calendar ID for '"+ cfg.dest_name +"'.")