From: Frank Brehm Date: Thu, 1 Jun 2023 12:39:25 +0000 (+0200) Subject: Substitute map() by a generator expression X-Git-Tag: 0.10.0^2~27 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=55afc1316aff1dae7974e272073eeda49f63c2da;p=pixelpark%2Fpp-admin-tools.git Substitute map() by a generator expression --- diff --git a/lib/pp_admintools/app/dns_deploy_zones.py b/lib/pp_admintools/app/dns_deploy_zones.py index 58e6d95..70b8271 100644 --- a/lib/pp_admintools/app/dns_deploy_zones.py +++ b/lib/pp_admintools/app/dns_deploy_zones.py @@ -40,7 +40,7 @@ from .. import pp from ..config.dns_deploy_zones import DnsDeployZonesConfig from ..xlate import XLATOR -__version__ = '0.8.8' +__version__ = '0.8.9' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -424,7 +424,7 @@ class PpDeployZonesApp(PpPDNSApplication): cmd = shlex.split(self.cmd_named_checkconf) cmd.append('-p') - cmd_str = ' '.join(map(lambda x: pipes.quote(x), cmd)) + cmd_str = ' '.join((pipes.quote(x) for x in cmd)) LOG.debug(_('Executing: {}').format(cmd_str)) result = super(BaseApplication, self).run( @@ -778,7 +778,7 @@ class PpDeployZonesApp(PpPDNSApplication): cmd = shlex.split(self.cmd_named_checkconf) if self.verbose > 2: cmd.append('-p') - cmd_str = ' '.join(map(lambda x: pipes.quote(x), cmd)) + cmd_str = ' '.join((pipes.quote(x) for x in cmd)) LOG.debug(_('Executing: {}').format(cmd_str)) result = super(BaseApplication, self).run( @@ -814,7 +814,7 @@ class PpDeployZonesApp(PpPDNSApplication): LOG.debug(_('Checking, whether named is running ...')) cmd = shlex.split(self.cmd_named_status) - cmd_str = ' '.join(map(lambda x: pipes.quote(x), cmd)) + cmd_str = ' '.join((pipes.quote(x) for x in cmd)) LOG.debug(_('Executing: {}').format(cmd_str)) std_out = None @@ -846,7 +846,7 @@ class PpDeployZonesApp(PpPDNSApplication): LOG.info(_('Starting {} ...').format('named')) cmd = shlex.split(self.cmd_named_start) - cmd_str = ' '.join(map(lambda x: pipes.quote(x), cmd)) + cmd_str = ' '.join((pipes.quote(x) for x in cmd)) LOG.debug(_('Executing: {}').format(cmd_str)) if self.simulate: @@ -881,7 +881,7 @@ class PpDeployZonesApp(PpPDNSApplication): LOG.info(_('Restarting {} ...').format('named')) cmd = shlex.split(self.cmd_named_restart) - cmd_str = ' '.join(map(lambda x: pipes.quote(x), cmd)) + cmd_str = ' '.join((pipes.quote(x) for x in cmd)) LOG.debug(_('Executing: {}').format(cmd_str)) if self.simulate: @@ -916,7 +916,7 @@ class PpDeployZonesApp(PpPDNSApplication): LOG.info(_('Reloading {} ...').format('named')) cmd = shlex.split(self.cmd_named_reload) - cmd_str = ' '.join(map(lambda x: pipes.quote(x), cmd)) + cmd_str = ' '.join((pipes.quote(x) for x in cmd)) LOG.debug(_('Executing: {}').format(cmd_str)) if self.simulate: