]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
Make the linter happy
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 24 May 2023 15:56:25 +0000 (17:56 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 24 May 2023 15:56:25 +0000 (17:56 +0200)
lib/pp_admintools/app/barracuda_sync.py

index 0f36812f58b9528bb56a2fa65e35fc2786f0e265..2ced50fb3eb1ce053e7d51981a1468a2cceb0fdb 100644 (file)
@@ -30,7 +30,7 @@ from ldap3 import MODIFY_ADD, MODIFY_DELETE, MODIFY_REPLACE
 from .ldap import BaseLdapApplication
 from ..xlate import XLATOR
 
-__version__ = '0.8.7'
+__version__ = '0.8.8'
 LOG = logging.getLogger(__name__)
 
 _ = XLATOR.gettext
@@ -621,8 +621,8 @@ class BarracudaSyncApp(BaseLdapApplication):
             local_alias = self.existing_aliases[cn]
             mail = local_alias['alias']
 
-            if self.verbose > 2:
-                LOG.debug("Evaluating CN {!r} for modifications ...".format(cn))
+            if self.verbose > 3:
+                LOG.debug('Evaluating CN {!r} for modifications ...'.format(cn))
 
             if mail in self.ldap_mail_dns:
                 if self.verbose > 2:
@@ -634,8 +634,8 @@ class BarracudaSyncApp(BaseLdapApplication):
             for dn in self.ldap_aliases:
                 entry = self.ldap_aliases[dn]
                 if mail in entry['mail']:
-                    if self.verbose > 2:
-                        LOG.debug("Evaluating DN {!r} for modifications ...".format(dn))
+                    if self.verbose > 3:
+                        LOG.debug('Evaluating DN {!r} for modifications ...'.format(dn))
                     modify_data = self._create_modify_alias_data(cn, entry)
                     if modify_data:
                         self.aliases_to_modify[dn] = modify_data
@@ -703,7 +703,8 @@ class BarracudaSyncApp(BaseLdapApplication):
             if attrib_name.lower() == 'objectclass':
                 tgt_attrib_values = tgt_attribs[attrib_name].as_list()
             if self.verbose > 4:
-                LOG.debug('Target values for {!r}:'.format(attrib_name) + '\n' + pp(tgt_attrib_values))
+                LOG.debug('Target values for {!r}:'.format(attrib_name) + '\n' + pp(
+                    tgt_attrib_values))
             values_add = []
             values_del = []
 
@@ -744,10 +745,9 @@ class BarracudaSyncApp(BaseLdapApplication):
 
         return attr_changes
 
-
     # -------------------------------------------------------------------------
     def _create_ldap_entry_for_compare(self, cn):
-        """Creates an entry analogue to normalized_attributes() by the alias antry."""
+        """Create an entry analogue to normalized_attributes() by the alias antry."""
         local_alias = self.existing_aliases[cn]
         entry = CIDict()
         oclasses = CIStringSet()