Skip to content

Commit fe03447

Browse files
ftests: Remove unnecessary use of global in Log::log()
The global statement is only required when assigning to a global variable, not when simply reading its value. In Log::log(), the global log_level, global log_file and global log_fd declarations are unnecessary because these variables are only read. Remove both declarations from Log::log(). Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
1 parent 828cf35 commit fe03447

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

tests/ftests/log.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ class Log(object):
1818

1919
@staticmethod
2020
def log(msg, msg_level=consts.DEFAULT_LOG_LEVEL):
21-
global log_level, log_file, log_fd
22-
2321
if log_level >= msg_level:
2422
if log_fd is None:
2523
Log.open_logfd(log_file)

0 commit comments

Comments
 (0)