deviceinfo: resolve path for parser errors (!1732)
Display the resolved deviceinfo file path in exceptions from the deviceinfo parser. Instead of messages like these: RuntimeError: Please add 'deviceinfo_codename="lg-mako"' to: /home/user/.local/var/pmbootstrap/cache_git/pmaports/.gitlab-ci/testcases/../../device/device-lg-mako/deviceinfo We get the more readable version: RuntimeError: Please add 'deviceinfo_codename="lg-mako"' to: /home/user/.local/var/pmbootstrap/cache_git/pmaports/device/device-lg-mako/deviceinfo
This commit is contained in:
parent
747ccfdd75
commit
96d4f2e6be
|
@ -22,6 +22,9 @@ import pmb.config
|
|||
|
||||
|
||||
def sanity_check(info, path):
|
||||
# Resolve path for more readable error messages
|
||||
path = os.path.realpath(path)
|
||||
|
||||
# "flash_methods" is legacy
|
||||
if "flash_methods" in info:
|
||||
raise RuntimeError("deviceinfo_flash_methods has been renamed to"
|
||||
|
|
Loading…
Reference in New Issue