Accepting request 558883 from home:cbosdonnat:branches:Virtualization
- Get rid of "TypeError: Couldn't find foreign struct converter for 'cairo.Context'" errors by adding a dependency to python3-cairo. (bsc#1062865) - Python3: Fix 'local variable 'e' referenced before assignment' 0001-py3-store-exception-variables-for-use-outside-except.patch (bsc#1073594) OBS-URL: https://build.opensuse.org/request/show/558883 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=393
This commit is contained in:
parent
014d7ea639
commit
6f63b20eba
@ -0,0 +1,33 @@
|
|||||||
|
From d4b7853b17bd24e0d15a6887b877a627da361589 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdonnat@suse.com>
|
||||||
|
Date: Wed, 20 Dec 2017 09:38:18 +0100
|
||||||
|
Subject: [virt-manager][PATCH] py3: store exception variables for use outside
|
||||||
|
except
|
||||||
|
|
||||||
|
In python3 exceptions aren't defined outside the except block. Leading
|
||||||
|
to 'UnboundLocalError: local variable 'e' referenced before assignment'
|
||||||
|
errors.
|
||||||
|
|
||||||
|
To work around this, store the local variable into one that will have a
|
||||||
|
longer life.
|
||||||
|
---
|
||||||
|
virtManager/connection.py | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/virtManager/connection.py b/virtManager/connection.py
|
||||||
|
index c98fff3d..f9da6677 100644
|
||||||
|
--- a/virtManager/connection.py
|
||||||
|
+++ b/virtManager/connection.py
|
||||||
|
@@ -1439,7 +1439,8 @@ class vmmConnection(vmmGObject):
|
||||||
|
self._tick(*args, **kwargs)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
raise
|
||||||
|
- except Exception as e:
|
||||||
|
+ except Exception as err:
|
||||||
|
+ e = err
|
||||||
|
pass
|
||||||
|
|
||||||
|
if e is None:
|
||||||
|
--
|
||||||
|
2.15.1
|
||||||
|
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 20 08:31:19 UTC 2017 - cbosdonnat@suse.com
|
||||||
|
|
||||||
|
- Get rid of "TypeError: Couldn't find foreign struct converter for
|
||||||
|
'cairo.Context'" errors by adding a dependency to python3-cairo.
|
||||||
|
(bsc#1062865)
|
||||||
|
- Python3: Fix 'local variable 'e' referenced before assignment'
|
||||||
|
0001-py3-store-exception-variables-for-use-outside-except.patch
|
||||||
|
(bsc#1073594)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Dec 19 10:44:40 MST 2017 - carnold@suse.com
|
Tue Dec 19 10:44:40 MST 2017 - carnold@suse.com
|
||||||
|
|
||||||
|
@ -128,6 +128,7 @@ Patch208: 0003-virtinst-python3-avoid-using-long-type.patch
|
|||||||
Patch209: 0004-virtinst-python3-use-binary-mode-for-kernel.patch
|
Patch209: 0004-virtinst-python3-use-binary-mode-for-kernel.patch
|
||||||
Patch210: virtman-register-delete-event-for-details-dialog.patch
|
Patch210: virtman-register-delete-event-for-details-dialog.patch
|
||||||
Patch211: python3-fix-bytes-string-mess-in-serial-console.patch
|
Patch211: python3-fix-bytes-string-mess-in-serial-console.patch
|
||||||
|
Patch212: 0001-py3-store-exception-variables-for-use-outside-except.patch
|
||||||
# For upstream review
|
# For upstream review
|
||||||
Patch500: 0001-Improve-container-image-url-example.patch
|
Patch500: 0001-Improve-container-image-url-example.patch
|
||||||
Patch501: 0002-create-wizard-fix-alignment-in-os-container-page.patch
|
Patch501: 0002-create-wizard-fix-alignment-in-os-container-page.patch
|
||||||
@ -143,6 +144,7 @@ Requires: dconf
|
|||||||
Requires: gtk3
|
Requires: gtk3
|
||||||
Requires: python3-gobject-Gdk
|
Requires: python3-gobject-Gdk
|
||||||
# For console widget
|
# For console widget
|
||||||
|
Requires: python3-cairo
|
||||||
Requires: python3-gobject-cairo
|
Requires: python3-gobject-cairo
|
||||||
Recommends: python3-SpiceClientGtk
|
Recommends: python3-SpiceClientGtk
|
||||||
Requires: virt-install
|
Requires: virt-install
|
||||||
@ -306,6 +308,7 @@ machine).
|
|||||||
%patch209 -p1
|
%patch209 -p1
|
||||||
%patch210 -p1
|
%patch210 -p1
|
||||||
%patch211 -p1
|
%patch211 -p1
|
||||||
|
%patch212 -p1
|
||||||
%patch500 -p1
|
%patch500 -p1
|
||||||
%patch501 -p1
|
%patch501 -p1
|
||||||
%patch502 -p1
|
%patch502 -p1
|
||||||
|
Loading…
Reference in New Issue
Block a user