lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 13 Oct 2023 21:28:32 +0800
From:   Hu Haowen <2023002089@...k.tyut.edu.cn>
To:     gregkh@...uxfoundation.org
Cc:     Hu Haowen <2023002089@...k.tyut.edu.cn>, masahiroy@...nel.org,
        akpm@...ux-foundation.org, ndesaulniers@...gle.com,
        n.schier@....de, ojeda@...nel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] scripts/show_delta: add __main__ judgement before main code

When doing Python programming it is a nice convention to insert the if
statement `if __name__ == "__main__":` before any main code that does
actual functionalities to ensure the code will be executed only as a
script rather than as an imported module. Hence attach the missing
judgement to show_delta.

Signed-off-by: Hu Haowen <2023002089@...k.tyut.edu.cn>
---
 scripts/show_delta | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/show_delta b/scripts/show_delta
index 28e67e178194..291ad65e3089 100755
--- a/scripts/show_delta
+++ b/scripts/show_delta
@@ -125,4 +125,5 @@ def main():
 	for line in lines:
 		print (convert_line(line, base_time),)
 
-main()
+if __name__ == "__main__":
+	main()
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ