update.py: error out with unexpected arguments

It's easy to forget you need to use -l to specify the list of layers to
update and previously we just ignored unused arguments, so check for
them and error out if present.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2013-05-08 21:38:14 +01:00
parent 25f4acaa46
commit 714bc8e39f
2 changed files with 4 additions and 1 deletions

1
TODO
View File

@ -2,7 +2,6 @@ TODO:
* Duplication of first maintainer when editing to add a second?
* Try to re-use existing recipe record with same PN instead of deleting and re-creating (if within same layer)
* Update script should error out with extra unused parameters - too easy to forget to use -l with layer list
* meta-arago-extras is preferred over meta-networking e.g. for crda; probably need an explicit field for priority order
* Update script does not report which layer failed with -q when fetch fails
* Document macros for URL fields

View File

@ -179,6 +179,10 @@ def main():
options, args = parser.parse_args(sys.argv)
if len(args) > 1:
logger.error('unexpected argument "%s"' % args[1])
parser.print_help()
sys.exit(1)
# Get access to our Django model
newpath = os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0])) + '/..')