From 28cf6235e3f501755b9bb47ecb7332218d64ead3 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Wed, 24 May 2023 11:32:58 +0200 Subject: [PATCH] Bugfixing lib/pp_admintools/app/barracuda_sync.py --- lib/pp_admintools/app/barracuda_sync.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/pp_admintools/app/barracuda_sync.py b/lib/pp_admintools/app/barracuda_sync.py index db251fc..c9a2dd7 100644 --- a/lib/pp_admintools/app/barracuda_sync.py +++ b/lib/pp_admintools/app/barracuda_sync.py @@ -17,7 +17,7 @@ from pathlib import Path # Third party modules from fb_tools.argparse_actions import DirectoryOptionAction -from fb_tools.common import pp +# from fb_tools.common import pp from fb_tools.handler import BaseHandler from fb_tools.multi_config import DEFAULT_ENCODING # from fb_tools.xlate import format_list @@ -26,7 +26,7 @@ from fb_tools.multi_config import DEFAULT_ENCODING from .ldap import BaseLdapApplication from ..xlate import XLATOR -__version__ = '0.7.5' +__version__ = '0.7.6' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -281,7 +281,7 @@ class BarracudaSyncApp(BaseLdapApplication): continue m = self.re_pf_config.match(line) if m and m.group('key') == 'virtual_alias_maps': - values = m.group('value') + values = m.group('value') for mapping in self.re_pf_valsep.split(values): if self.verbose > 1: LOG.debug(_('Evaluating mapping {!r}.').format(mapping)) @@ -330,7 +330,7 @@ class BarracudaSyncApp(BaseLdapApplication): if not m: msg = _('Could not evaluate virtual alias mapping {!r}.').format(mapping) LOG.error(msg) - self.virtalias_mappings.remove(va_file) + self.virtalias_mappings.remove(mapping) return table_type = m.group('table_type') @@ -343,7 +343,7 @@ class BarracudaSyncApp(BaseLdapApplication): if not va_file.exists() or not va_file.is_file(): msg = _('Virtual alias mapping file {!r} does not exists.').format(str(va_file)) LOG.error(msg) - self.virtalias_mappings.remove(va_file) + self.virtalias_mappings.remove(mapping) return db_file = va_file.parent / (va_file.name + db_extension) @@ -351,7 +351,7 @@ class BarracudaSyncApp(BaseLdapApplication): LOG.error(_( 'DB file for virtual aliases {!r} does not exists or is not a regular ' 'file.').format(str(db_file))) - self.virtalias_mappings.remove(va_file) + self.virtalias_mappings.remove(mapping) return mtime_db_file = db_file.stat().st_mtime -- 2.39.5