summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/__init__.py
diff options
context:
space:
mode:
authorScott Garman <scott.a.garman@intel.com>2011-06-14 16:44:58 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-15 11:13:13 +0100
commit62d538fbe65cf61ebc5996b0d6eb7e4ec47b6ead (patch)
tree685b0c48785db94f4fc26f727932f8779bc2fb5a /bitbake/lib/bb/fetch2/__init__.py
parent039798a4d250665c66fd738dba4d07dc2ec70652 (diff)
downloadpoky-62d538fbe65cf61ebc5996b0d6eb7e4ec47b6ead.tar.gz
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 <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/__init__.py')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py4
1 files changed, 2 insertions, 2 deletions
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):
663 663
664 try: 664 try:
665 unpack = bb.utils.to_boolean(urldata.parm.get('unpack'), True) 665 unpack = bb.utils.to_boolean(urldata.parm.get('unpack'), True)
666 except ValueError, exc: 666 except ValueError as exc:
667 bb.fatal("Invalid value for 'unpack' parameter for %s: %s" % 667 bb.fatal("Invalid value for 'unpack' parameter for %s: %s" %
668 (file, urldata.parm.get('unpack'))) 668 (file, urldata.parm.get('unpack')))
669 669
@@ -692,7 +692,7 @@ class FetchMethod(object):
692 elif file.endswith('.zip') or file.endswith('.jar'): 692 elif file.endswith('.zip') or file.endswith('.jar'):
693 try: 693 try:
694 dos = bb.utils.to_boolean(urldata.parm.get('dos'), False) 694 dos = bb.utils.to_boolean(urldata.parm.get('dos'), False)
695 except ValueError, exc: 695 except ValueError as exc:
696 bb.fatal("Invalid value for 'dos' parameter for %s: %s" % 696 bb.fatal("Invalid value for 'dos' parameter for %s: %s" %
697 (file, urldata.parm.get('dos'))) 697 (file, urldata.parm.get('dos')))
698 cmd = 'unzip -q -o' 698 cmd = 'unzip -q -o'