From: Frank Brehm Date: Tue, 6 Feb 2018 14:54:10 +0000 (+0100) Subject: Applying flake8 rules to pp_lib/deploy_zones_from_pdns.py X-Git-Tag: 0.1.2~6^2~29 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=df83b914fd03f46162811c74d727db2c38e46f03;p=pixelpark%2Fadmin-tools.git Applying flake8 rules to pp_lib/deploy_zones_from_pdns.py --- diff --git a/pp_lib/deploy_zones_from_pdns.py b/pp_lib/deploy_zones_from_pdns.py index fb0d533..fe5b66b 100644 --- a/pp_lib/deploy_zones_from_pdns.py +++ b/pp_lib/deploy_zones_from_pdns.py @@ -13,7 +13,7 @@ import logging import logging.config import textwrap import re -import shlex, subprocess +import shlex import copy import datetime import socket @@ -28,24 +28,16 @@ from functools import cmp_to_key # Third party modules import six -from six import reraise -import requests from pytz import timezone, UnknownTimeZoneError -from six.moves.urllib.parse import urlunsplit - # Own modules from .common import pp, compare_fqdn, to_str, to_bool -from .common import RE_DOT_AT_END from .pdns_app import PpPDNSAppError, PpPDNSApplication -from .pdns_app import PDNSApiNotFoundError, PDNSApiValidationError -from .pdns_zone import PdnsApiZone -from .pdns_record import compare_rrsets -from .pidfile import PidFileError, InvalidPidFileError, PidFileInUseError, PidFile +from .pidfile import PidFileError, PidFile -__version__ = '0.5.3' +__version__ = '0.5.4' LOG = logging.getLogger(__name__) @@ -113,8 +105,8 @@ class PpDeployZonesApp(PpPDNSApplication): # Configuration files and directories self.named_conf_dir = self.default_named_conf_dir self._named_zones_cfg_file = self.default_named_zones_cfg_file - self.named_basedir = self.default_named_basedir - self._named_slavedir = self.default_named_slavedir + self.named_basedir = self.default_named_basedir + self._named_slavedir = self.default_named_slavedir self.zone_masters = copy.copy(self.zone_masters_public) self.masters_configured = False @@ -139,7 +131,6 @@ class PpDeployZonesApp(PpPDNSApplication): self.files2replace = {} self.moved_files = {} - description = textwrap.dedent('''\ Generation of the BIND9 configuration file for slave zones. ''') @@ -332,7 +323,7 @@ class PpDeployZonesApp(PpPDNSApplication): base_dir=self.base_dir, simulate=self.simulate) self.initialized = True - + # ------------------------------------------------------------------------- def pre_run(self): """