bitbake: 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]

(Bitbake rev: d19e305ffa44a848b02ede63dc5de8d2640089e6)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh 2016-05-10 17:10:30 +03:00 committed by Richard Purdie
parent 519a85ef25
commit 0854035d9c
1 changed files with 3 additions and 3 deletions

View File

@ -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")