patman: Don't run patman when it is imported as a module
authorSimon Glass <sjg@chromium.org>
Thu, 30 Jul 2015 19:47:41 +0000 (13:47 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 31 Jul 2015 13:31:12 +0000 (07:31 -0600)
commit9649e152cbdd98d836912c45acd1f03fc70a21a5
treee82a82d7f4ba70e70c7456cc1d8ce4e7e31d4189
parentcc35734358540a1bbaf042fdf9f4cb2de17389ed
patman: Don't run patman when it is imported as a module

Commit 488d19c (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 patman.py. This is good practice in any case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
tools/patman/patman.py