]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
log.py: make it PEP8 compliant
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Thu, 17 Feb 2022 11:14:30 +0000 (16:44 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Tue, 22 Feb 2022 19:52:52 +0000 (12:52 -0700)
Make log.py PEP-8 compliant.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
ftests/log.py

index 835a28c0f332958411b9d2e2a777dc9b2ccfaac2..4f8543d96eb329d0f36d52d026eda5a8f57f1990 100644 (file)
@@ -19,8 +19,8 @@
 # along with this library; if not, see <http://www.gnu.org/licenses>.
 #
 
-import consts
 import datetime
+import consts
 import log
 
 log_level = consts.DEFAULT_LOG_LEVEL
@@ -37,22 +37,22 @@ class Log(object):
                 Log.open_logfd(log.log_file)
 
             timestamp = datetime.datetime.now().strftime('%b %d %H:%M:%S')
-            log_fd.write("{}: {}\n".format(timestamp, msg))
+            log_fd.write('{}: {}\n'.format(timestamp, msg))
 
     @staticmethod
     def open_logfd(log_file):
-        log.log_fd = open(log_file, "a")
+        log.log_fd = open(log_file, 'a')
 
     @staticmethod
     def log_critical(msg):
-        Log.log("CRITICAL: {}".format(msg), consts.LOG_CRITICAL)
+        Log.log('CRITICAL: {}'.format(msg), consts.LOG_CRITICAL)
 
     @staticmethod
     def log_warning(msg):
-        Log.log("WARNING: {}".format(msg), consts.LOG_WARNING)
+        Log.log('WARNING: {}'.format(msg), consts.LOG_WARNING)
 
     @staticmethod
     def log_debug(msg):
-        Log.log("DEBUG: {}".format(msg), consts.LOG_DEBUG)
+        Log.log('DEBUG: {}'.format(msg), consts.LOG_DEBUG)
 
 # vim: set et ts=4 sw=4: