Procházet zdrojové kódy

Moving the debug log at the proper place.

If we don't do this, we might get the following in the logs:

  2014-04-08 20:00:59,354 - DEBUG: Section 'r' matches
  2014-04-08 20:00:59,354 - DEBUG: Section 'r' does not match

which is a bit confusing.
Julien Miotte před 12 roky
rodič
revize
6677dbcdc9
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      radicale/rights/regex.py

+ 2 - 1
radicale/rights/regex.py

@@ -87,7 +87,8 @@ def _read_from_sections(user, collection, permission):
                 log.LOGGER.debug("Section '%s' matches" % section)
                 if permission in regex.get(section, "permission"):
                     return True
-        log.LOGGER.debug("Section '%s' does not match" % section)
+            else:
+                log.LOGGER.debug("Section '%s' does not match" % section)
     return False