[oe-commits] [bitbake] 05/05: toaster: use new syntax of except statement
git at git.openembedded.org
git at git.openembedded.org
Fri May 13 21:06:50 UTC 2016
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit d19e305ffa44a848b02ede63dc5de8d2640089e6
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 82cc52e..e78b0da 100755
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -2887,7 +2887,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
@@ -2915,7 +2915,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
@@ -2978,5 +2978,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