Commit 9649e152 authored by Simon Glass's avatar Simon Glass

patman: Don't run patman when it is imported as a module

Commit 488d19cb (patman: add distutils based installer) has the side effect
of making patman run twice with each invocation. Fix this by checking for
'main program' invocation in This is good practice in any case.
Signed-off-by: default avatarSimon Glass <>
Reviewed-by: default avatarChris Packham <>
parent cc357343
......@@ -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__":
# Run our meagre tests
if options.test:
elif options.test:
import doctest
sys.argv = [sys.argv[0]]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment