[virt-tools-list] [virt-bootstrap] [PATCH 5/7] pylint: Resolve logging-not-lazy

Radostin Stoyanov rstoyanov1 at gmail.com
Wed Feb 28 00:11:03 UTC 2018


Specify string format arguments as logging function parameters
(logging-not-lazy)

https://docs.python.org/3/library/logging.html#logging.Logger.debug

Signed-off-by: Radostin Stoyanov <rstoyanov1 at gmail.com>
---
 src/virtBootstrap/sources/docker_source.py | 2 +-
 src/virtBootstrap/sources/file_source.py   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/virtBootstrap/sources/docker_source.py b/src/virtBootstrap/sources/docker_source.py
index 30a3e2e..ff96078 100644
--- a/src/virtBootstrap/sources/docker_source.py
+++ b/src/virtBootstrap/sources/docker_source.py
@@ -319,7 +319,7 @@ class DockerSource(object):
         else:
             self.progress("Download and extract completed!", value=100,
                           logger=logger)
-            logger.info("Files are stored in: " + dest)
+            logger.info("Files are stored in: %s", dest)
 
         finally:
             # Clean up
diff --git a/src/virtBootstrap/sources/file_source.py b/src/virtBootstrap/sources/file_source.py
index 44f4fa6..be741ea 100644
--- a/src/virtBootstrap/sources/file_source.py
+++ b/src/virtBootstrap/sources/file_source.py
@@ -96,4 +96,4 @@ class FileSource(object):
 
         self.progress("Extraction completed successfully!", value=100,
                       logger=logger)
-        logger.info("Files are stored in: " + dest)
+        logger.info("Files are stored in: %s", dest)
-- 
2.14.3




More information about the virt-tools-list mailing list