#31 Add a little logging for whitelist/blacklist processing.
Merged 8 years ago by jkaluza. Opened 8 years ago by ralph.

@@ -112,12 +112,16 @@ 

          try:

              whitelist = whitelist_rules.get(artifact_type, [])

              if whitelist and not any([match_rule(name, branch, rule) for rule in whitelist]):

+                 log.debug('name=%r, branch=%r, type=%r is not whitelisted.',

+                           name, branch, artifact_type)

                  in_whitelist = False

  

              # only need to check blacklist when it is in whitelist first

              if in_whitelist:

                  blacklist = blacklist_rules.get(artifact_type, [])

                  if blacklist and any([match_rule(name, branch, rule) for rule in blacklist]):

+                     log.debug('name=%r, branch=%r, type=%r is blacklisted.',

+                               name, branch, artifact_type)

                      in_blacklist = True

  

          except re.error as exc:

This will be nice for operators.

Unnecessary to format string in log.* method

rebased

8 years ago

@cqi, this has been rebased with respect to your comment.

indent issue here: E128 continuation line under-indented for visual indent

rebased

8 years ago

Thanks @qwan. Rebased to fix "indent issue here: E128 continuation line under-indented for visual indent"

Pull-Request has been merged by jkaluza

8 years ago
Metadata