diff mbox series

[v2,06/13] bitbake-setup: Add the conditional script stanza

Message ID 20260331160703.3137930-7-rob.woolley@windriver.com
State New
Headers show
Series bitbake-setup PyPI Packaging | expand

Commit Message

Rob Woolley March 31, 2026, 4:06 p.m. UTC
This ensures that the main function is only executed if
the module is executed in the top-level environment.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
---
 bin/bitbake-setup | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index f602dc1e2..be420adb6 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -1403,4 +1403,5 @@  def main():
     else:
         parser.print_help()
 
-main()
+if __name__ == '__main__':
+    main()