about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAnton Bambura <jenneron@protonmail.com>2024-02-12 14:50:20 +0200
committerAnton Bambura <jenneron@protonmail.com>2024-02-12 14:50:27 +0200
commitb2c82bfe2f200c1e598d57ba17b207dc221bbd4c (patch)
treec919a5dce24691976d122b83a456760c0ce13ed8
parent14cc846782757ab819825eec9479ee23c6181e1a (diff)
don't execute main() when included as module
-rwxr-xr-xcros-keyboard-map.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cros-keyboard-map.py b/cros-keyboard-map.py
index 3f491be..e0b89e8 100755
--- a/cros-keyboard-map.py
+++ b/cros-keyboard-map.py
@@ -119,4 +119,5 @@ def main():
     with open("cros.conf", "w") as conf:
         conf.write(config)
 
-main()
+if __name__ == "__main__":
+    main()