diff options
| author | Jamin Lin <jamin_lin@aspeedtech.com> | 2024-01-03 18:13:44 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-01-07 12:24:57 +0000 |
| commit | 64d5db2f89b4f3712b55127215ae02ce50dd747a (patch) | |
| tree | dc071a4c1c72e59021435b3e66b271faf2a37834 /scripts/lib | |
| parent | ee274a9d085daa6d190a9241d90dd66cc29c42ec (diff) | |
| download | poky-64d5db2f89b4f3712b55127215ae02ce50dd747a.tar.gz | |
devtool: modify: fix exception
Root Cause:
initial_revs is an empty dictionary and do not have "." key.
Traceback (most recent call last):
File "scripts/devtool", line 349, in <module>
ret = main()
File "scripts/devtool", line 336, in main
ret = args.func(args, config, basepath, workspace)
File "scripts/lib/devtool/standard.py", line 922, in modify
if not initial_revs["."]:
KeyError: '.'
Solution:
check key exists, then get its value.
(From OE-Core rev: fb0db5c48abb4d56233a175fdd349d18b972e452)
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
| -rw-r--r-- | scripts/lib/devtool/standard.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 559fd45676..2e56cd3050 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
| @@ -921,7 +921,7 @@ def modify(args, config, basepath, workspace): | |||
| 921 | if line.startswith('*'): | 921 | if line.startswith('*'): |
| 922 | (stdout, _) = bb.process.run('git rev-parse devtool-base', cwd=srctree) | 922 | (stdout, _) = bb.process.run('git rev-parse devtool-base', cwd=srctree) |
| 923 | initial_revs["."] = stdout.rstrip() | 923 | initial_revs["."] = stdout.rstrip() |
| 924 | if not initial_revs["."]: | 924 | if "." not in initial_revs: |
| 925 | # Otherwise, just grab the head revision | 925 | # Otherwise, just grab the head revision |
| 926 | (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srctree) | 926 | (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srctree) |
| 927 | initial_revs["."] = stdout.rstrip() | 927 | initial_revs["."] = stdout.rstrip() |
