File ae8a4f3d-engine-Fix-first-run-startup-error.patch of Package virt-manager

Subject: engine: Fix first run startup error (bz 1674040)
From: Cole Robinson crobinso@redhat.com Fri Feb 8 15:50:15 2019 -0500
Date: Fri Feb 8 15:50:15 2019 -0500:
Git: ae8a4f3db3c1492a219a0d6ec8d32c765ac076bd

unitpath can be used uninitialized

https://bugzilla.redhat.com/show_bug.cgi?id=1674040

diff --git a/virtManager/engine.py b/virtManager/engine.py
index bf422b36..492c67db 100644
--- a/virtManager/engine.py
+++ b/virtManager/engine.py
@@ -135,6 +135,7 @@ class vmmEngine(vmmGObject):
         unitname = "libvirtd.service"
         libvirtd_installed = False
         libvirtd_active = False
+        unitpath = None
 
         # Fetch all units from systemd
         try:
@@ -165,7 +166,7 @@ class vmmEngine(vmmGObject):
 
         # If it's not running, try to start it
         try:
-            if units and libvirtd_installed and not libvirtd_active:
+            if unitpath and libvirtd_installed and not libvirtd_active:
                 unit = Gio.DBusProxy.new_sync(
                         bus, 0, None,
                         "org.freedesktop.systemd1", unitpath,
openSUSE Build Service is sponsored by