From: Frank Brehm Date: Tue, 24 Apr 2018 12:56:33 +0000 (+0200) Subject: Applying flake8 rules to lib/cr_vmware_tpl/config.py X-Git-Tag: 0.1.1~7^2~4 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=49e000d13797538e9fe8d79d4281335894333fdd;p=pixelpark%2Fcreate-vmware-tpl.git Applying flake8 rules to lib/cr_vmware_tpl/config.py --- diff --git a/lib/cr_vmware_tpl/config.py b/lib/cr_vmware_tpl/config.py index c7fd149..0a6e61d 100644 --- a/lib/cr_vmware_tpl/config.py +++ b/lib/cr_vmware_tpl/config.py @@ -9,7 +9,6 @@ from __future__ import absolute_import # Standard module -import sys import os import logging import re @@ -23,11 +22,11 @@ from six.moves import configparser from configparser import Error as ConfigParseError # Own modules -from .errors import FunctionNotImplementedError, PpError +from .errors import PpError from .obj import PpBaseObject -__version__ = '0.5.5' +__version__ = '0.5.6' LOG = logging.getLogger(__name__) @@ -196,7 +195,7 @@ class CrTplConfiguration(PpBaseObject): else: config.read_file(stream) except ConfigParseError as e: - msg = "Wrong configuration in {!r} found: ".format(cfg_file) + msg = "Wrong configuration in {!r} found: ".format(self.config_file) msg += str(e) self.handle_error(msg, "Configuration error") return @@ -309,15 +308,15 @@ class CrTplConfiguration(PpBaseObject): v = float(value) if v < self.min_max_wait_for_finish_install: LOG.error(( - "Value {val} for max_wait_for_finish_install is less than {minval}, " - "using {default} seconds.").format(val=v, - minval=self.min_max_wait_for_finish_install, + "Value {val} for max_wait_for_finish_install is less than " + "{minval}, using {default} seconds.").format( + val=v, minval=self.min_max_wait_for_finish_install, default=self.default_max_wait_for_finish_install)) elif v > self.max_max_wait_for_finish_install: LOG.error(( - "Value {val} for max_wait_for_finish_install is greater than {maxval}, " - "using {default} seconds.").format(val=v, - maxval=self.max_max_wait_for_finish_install, + "Value {val} for max_wait_for_finish_install is greater than " + "{maxval}, using {default} seconds.").format( + val=v, maxval=self.max_max_wait_for_finish_install, default=self.default_max_wait_for_finish_install)) else: self.max_wait_for_finish_install = v