summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-04-11 10:35:39 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-10 23:47:36 +0100
commit9011366689b26305281fcb2d412dcacece917e18 (patch)
tree85aed1e3f500fdf60d3e603c01b04aa4e0eba022
parent227c5acd4b40154bc61202e7bb67a13818a7d727 (diff)
downloadbitbake-contrib-9011366689b26305281fcb2d412dcacece917e18.tar.gz
bitbake-diffsigs: fix traceback with no arguments
In the move over to argparse we've made the two signature file arguments optional and thus if -t is not in use we need to explicitly check if at least one signature file has been specified - and if not, show an error and the command-line help. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbin/bitbake-diffsigs4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/bitbake-diffsigs b/bin/bitbake-diffsigs
index 884be1e3c..eb2f85979 100755
--- a/bin/bitbake-diffsigs
+++ b/bin/bitbake-diffsigs
@@ -147,6 +147,10 @@ else:
output = bb.siggen.compare_sigfiles(options.sigdatafile1, options.sigdatafile2, color=color)
elif options.sigdatafile1:
output = bb.siggen.dump_sigfile(options.sigdatafile1)
+ else:
+ logger.error('Must specify signature file(s) or -t/--task')
+ parser.print_help()
+ sys.exit(1)
except IOError as e:
logger.error(str(e))
sys.exit(1)