From 62d538fbe65cf61ebc5996b0d6eb7e4ec47b6ead Mon Sep 17 00:00:00 2001 From: Scott Garman Date: Tue, 14 Jun 2011 16:44:58 -0700 Subject: make exception handling syntax consistent Update exception handling syntax to use the modern style: except ExcType as localvar (Bitbake rev: dbf5f42b06bef81749b13aa99945cc1292a6676d) Signed-off-by: Scott Garman Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bb/fetch2/__init__.py') diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 02a36b523d..e9a64c57c0 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -663,7 +663,7 @@ class FetchMethod(object): try: unpack = bb.utils.to_boolean(urldata.parm.get('unpack'), True) - except ValueError, exc: + except ValueError as exc: bb.fatal("Invalid value for 'unpack' parameter for %s: %s" % (file, urldata.parm.get('unpack'))) @@ -692,7 +692,7 @@ class FetchMethod(object): elif file.endswith('.zip') or file.endswith('.jar'): try: dos = bb.utils.to_boolean(urldata.parm.get('dos'), False) - except ValueError, exc: + except ValueError as exc: bb.fatal("Invalid value for 'dos' parameter for %s: %s" % (file, urldata.parm.get('dos'))) cmd = 'unzip -q -o' -- cgit v1.2.3-54-g00ecf