diff options
author | Chris Larson <clarson@kergoth.com> | 2004-12-08 22:48:08 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2004-12-08 22:48:08 +0000 |
commit | 0192abf5d06a3c2e0290a838cadadf303363336c (patch) | |
tree | 398369edd875377935634e9598a9763dd4697382 /bin/bbread | |
parent | 694a396abf10001d2b605bbb83e55ab44805a17f (diff) | |
download | bitbake-0192abf5d06a3c2e0290a838cadadf303363336c.tar.gz |
Make bbread spit out a nicer error when it encounters an IOError.
Diffstat (limited to 'bin/bbread')
-rwxr-xr-x | bin/bbread | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/bbread b/bin/bbread index f48c2aa2e..b496e7677 100755 --- a/bin/bbread +++ b/bin/bbread @@ -22,11 +22,16 @@ sys.path.append(os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib import bb, bb.parse, bb.build d = bb.data.init() -d = bb.parse.handle(os.path.join('conf', 'bitbake.conf'), d) +try: + d = bb.parse.handle(os.path.join('conf', 'bitbake.conf'), d) +except IOError, e: + bb.fatal("Unable to read conf/bitbake.conf: %s" % e) if len(sys.argv) == 2: try: d = bb.parse.handle(sys.argv[1], d) + except IOError, e: + bb.fatal("Unable to read %s: %s" % (sys.argv[1], e)) except Exception, e: bb.fatal("%s" % e) |