[oe-commits] [bitbake] 22/25: toaster: use new syntax of except statement
git at git.openembedded.org
git at git.openembedded.org
Fri May 13 16:47:29 UTC 2016
rpurdie pushed a commit to branch python3
in repository bitbake.
commit b41f2d919e8f6173a999fb5d43ff297e7472352d
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Tue May 10 17:10:30 2016 +0300
toaster: use new syntax of except statement
Used except 'except (<exception1>, <exception2>):' syntax as it's
supported by python 2 and pythone 3.
Old syntax 'except <exception1>, <exception2>:' is not supported
by python 3.
[YOCTO #9584]
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/toaster/toastergui/views.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index ecc8f80..657ce0c 100755
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -2902,7 +2902,7 @@ if True:
else:
context['dl_dir'] = ProjectVariable.objects.get(project = prj, name = "DL_DIR").value
context['dl_dir_defined'] = "1"
- except ProjectVariable.DoesNotExist,BuildEnvironment.DoesNotExist:
+ except (ProjectVariable.DoesNotExist, BuildEnvironment.DoesNotExist):
pass
try:
context['fstypes'] = ProjectVariable.objects.get(project = prj, name = "IMAGE_FSTYPES").value
@@ -2930,7 +2930,7 @@ if True:
else:
context['sstate_dir'] = ProjectVariable.objects.get(project = prj, name = "SSTATE_DIR").value
context['sstate_dir_defined'] = "1"
- except ProjectVariable.DoesNotExist, BuildEnvironment.DoesNotExist:
+ except (ProjectVariable.DoesNotExist, BuildEnvironment.DoesNotExist):
pass
return context
@@ -2993,5 +2993,5 @@ if True:
return response
else:
return render(request, "unavailable_artifact.html")
- except ObjectDoesNotExist, IOError:
+ except (ObjectDoesNotExist, IOError):
return render(request, "unavailable_artifact.html")
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list