From: Chris Larson Date: Wed, 8 Dec 2004 22:48:08 +0000 (+0000) Subject: Make bbread spit out a nicer error when it encounters an IOError. X-Git-Tag: 1.0~24 X-Git-Url: http://code.vuplus.com/gitweb/?a=commitdiff_plain;ds=sidebyside;h=0192abf5d06a3c2e0290a838cadadf303363336c;hp=694a396abf10001d2b605bbb83e55ab44805a17f;p=vuplus_bitbake Make bbread spit out a nicer error when it encounters an IOError. --- diff --git a/MANIFEST b/MANIFEST index e867727..12808c2 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,7 +1,7 @@ MANIFEST setup.py bin/bbimage -bin/bbmake +bin/bitbake bin/bbread lib/bb/__init__.py lib/bb/build.py diff --git a/bin/bbread b/bin/bbread index f48c2aa..b496e76 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) diff --git a/setup.py b/setup.py index 4c71b66..f90c3e0 100755 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ setup(name='bitbake', author_email='clarson@elinux.org', packages=['bb', 'bb.parse'], package_dir={'bb': os.path.join('lib', 'bb')}, - scripts=[os.path.join('bin', 'bbmake'), + scripts=[os.path.join('bin', 'bitbake'), os.path.join('bin', 'bbread'), os.path.join('bin', 'bbimage')], data_files=[(os.path.join(bbdir, 'conf'), [os.path.join('conf', 'bitbake.conf')]),