Code review comment for lp:~ctf/checkbox/dump_options_to_log

Revision history for this message
Marc Tardif (cr3) wrote :

If all you want is to be notified of the whitelist file that was used, which I concede is valuable information, then I would propose the following change. Notice how I use logging.info instead of logging.debug because the whitelist file being read is oddly more important than just printing the command line options which may contain the same information:

=== modified file 'plugins/jobs_info.py'
--- plugins/jobs_info.py 2012-02-15 16:31:04 +0000
+++ plugins/jobs_info.py 2012-02-29 17:58:46 +0000
@@ -71,7 +71,12 @@
     def register(self, manager):
         super(JobsInfo, self).register(manager)

+ if self.whitelist_file:
+ logging.info("Reading whitelist patterns from %s" % self.whitelist_file)
         self.whitelist_patterns = self.get_patterns(self.whitelist, self.whitelist_file)
+
+ if self.blacklist_file:
+ logging.info("Reading blacklist patterns from %s" % self.blacklist_file)
         self.blacklist_patterns = self.get_patterns(self.blacklist, self.blacklist_file)

         self._manager.reactor.call_on("gather", self.gather)

« Back to merge proposal