]> code.ossystems Code Review - openembedded-core.git/commit
scripts/oe-git-archive: fix non-existent key referencing error
authorYeoh Ee Peng <ee.peng.yeoh@intel.com>
Fri, 4 Jan 2019 06:46:01 +0000 (14:46 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 28 Jan 2019 16:56:28 +0000 (16:56 +0000)
commitf51e59bb6d571606cf887a3f623380cc3516c5a2
treed1e041c599d2c83f175b66219853a44b2cea9234
parent284252d1b6d1672a5b6c042fa591f00d89613a22
scripts/oe-git-archive: fix non-existent key referencing error

Without installing gitpython package, oe-git-archive will face error
below, where it was referencing key that was non-existent inside
metadata object.

Traceback (most recent call last):
  File "<poky_dir>/scripts/oe-git-archive", line 271, in <module>
    sys.exit(main())
  File "<poky_dir>/scripts/oe-git-archive", line 229, in main
    'commit_count': metadata['layers']['meta']['commit_count'],
KeyError: 'commit_count'

Fix this error by adding exception catch when referencing
non-existent key (based on inputs provided by Richard Purdie).

[YOCTO# 13082]

(From OE-Core rev: 9a3cc9b8523b78dda6c3f3f2e12798b2b907d7e5)

Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
scripts/oe-git-archive