]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - tools/patman/patman.py
patman: Don't run patman when it is imported as a module
[karo-tx-uboot.git] / tools / patman / patman.py
index e76fc42dd1973108809b9c35f4bb04cc7b793f4d..6fe8fe068c36f5028c1ccb3ed65fc994450c11a6 100755 (executable)
@@ -74,8 +74,11 @@ specified by tags you place in the commits. Use -n to do a dry run first."""
 settings.Setup(parser, options.project, '')
 (options, args) = parser.parse_args()
 
+if __name__ != "__main__":
+    pass
+
 # Run our meagre tests
-if options.test:
+elif options.test:
     import doctest
 
     sys.argv = [sys.argv[0]]