aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex/update.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-05-08 21:38:14 +0100
committerPaul Eggleton <paul.eggleton@linux.intel.com>2013-05-08 22:01:25 +0100
commit714bc8e39f1b250c3be82ecd49d2bf339e37a505 (patch)
treebf914797dfbf4e0e801978e03ef1f9a7c80bdcaf /layerindex/update.py
parent25f4acaa4613cc02876e535d7445cc151b6d7354 (diff)
downloadopenembedded-core-contrib-714bc8e39f1b250c3be82ecd49d2bf339e37a505.tar.gz
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>
Diffstat (limited to 'layerindex/update.py')
-rwxr-xr-xlayerindex/update.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/layerindex/update.py b/layerindex/update.py
index 1582d80163..c32d8cc684 100755
--- a/layerindex/update.py
+++ b/layerindex/update.py
@@ -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])) + '/..')