]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Applying flake8 rules to lib/cr_vmware_tpl/config.py
authorFrank Brehm <frank.brehm@pixelpark.com>
Tue, 24 Apr 2018 12:56:33 +0000 (14:56 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Tue, 24 Apr 2018 12:56:33 +0000 (14:56 +0200)
lib/cr_vmware_tpl/config.py

index c7fd1495c2a16b9353b61bc759b66933b71b1333..0a6e61d54098a0dc1e79f642be6fc13f380c63cd 100644 (file)
@@ -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