Print unparsable file in pkg-map

As you can see in the CI failures for
Ib11b9df84b593ab25232729a570c812f1b4b8774, you can not see what file
is causing the problems when the parser fails.  Add a print, but raise
the error as it contains the cause.

Change-Id: I127ff7d57d2d898969195464c6e774d496e872e6
This commit is contained in:
Ian Wienand 2016-01-14 16:21:25 +11:00
parent d5da803ff8
commit c110a56ea9

View File

@ -74,7 +74,11 @@ def main():
sys.exit(2)
with open(map_file) as fd:
try:
package_names = json.loads(fd.read())
except ValueError:
eprint('Unable to parse %s' % map_file)
raise
# Parse mapping data in this form using distro/family/default
# Most specific takes priority (distro is most specific).