]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: use new syntax of except statement
authorEd Bartosh <ed.bartosh@linux.intel.com>
Tue, 10 May 2016 14:10:30 +0000 (17:10 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 13 May 2016 21:05:10 +0000 (22:05 +0100)
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@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/toaster/toastergui/views.py

index 82cc52ead87c3bb6c1d06c676b507d37699d2baa..e78b0dab8988cbc779710d1de6f68e4cdeb7fb43 100755 (executable)
@@ -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")