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-11 18:05:09 +0100
commitf187553b6db7832a14b58ce6aa1801711ab9ff4d (patch)
tree7a791f5b5bbd134ce90ad73f0d11524602fe12ed
parentfc6370626e31951d112337c7a5f9ae15a4b73965 (diff)
downloadpoky-f187553b6db7832a14b58ce6aa1801711ab9ff4d.tar.gz
bitbake: 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. (Bitbake rev: 9011366689b26305281fcb2d412dcacece917e18) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/bin/bitbake-diffsigs4
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/bin/bitbake-diffsigs b/bitbake/bin/bitbake-diffsigs
index 884be1e3c7..eb2f859793 100755
--- a/bitbake/bin/bitbake-diffsigs
+++ b/bitbake/bin/bitbake-diffsigs
@@ -147,6 +147,10 @@ else:
147 output = bb.siggen.compare_sigfiles(options.sigdatafile1, options.sigdatafile2, color=color) 147 output = bb.siggen.compare_sigfiles(options.sigdatafile1, options.sigdatafile2, color=color)
148 elif options.sigdatafile1: 148 elif options.sigdatafile1:
149 output = bb.siggen.dump_sigfile(options.sigdatafile1) 149 output = bb.siggen.dump_sigfile(options.sigdatafile1)
150 else:
151 logger.error('Must specify signature file(s) or -t/--task')
152 parser.print_help()
153 sys.exit(1)
150 except IOError as e: 154 except IOError as e:
151 logger.error(str(e)) 155 logger.error(str(e))
152 sys.exit(1) 156 sys.exit(1)