[virt-tools-list] [virt-manager PATCH v2 5/8] tests: fix to not fail with libosinfo
Giuseppe Scrivano
gscrivan at redhat.com
Mon Feb 17 15:40:03 UTC 2014
Signed-off-by: Giuseppe Scrivano <gscrivan at redhat.com>
---
tests/misc.py | 3 +--
virtinst/osdict.py | 2 +-
virtinst/urlfetcher.py | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/tests/misc.py b/tests/misc.py
index c164d25..243d778 100644
--- a/tests/misc.py
+++ b/tests/misc.py
@@ -22,8 +22,7 @@ import os
import sys
import unittest
-_badmodules = ["gi.repository.Gtk", "gi.repository.GObject",
- "gi.repository.Gdk", "gi.repository.GLib"]
+_badmodules = ["gi.repository.Gtk", "gi.repository.Gdk"]
def _restore_modules(fn):
diff --git a/virtinst/osdict.py b/virtinst/osdict.py
index 3c22b6a..698005d 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -22,7 +22,7 @@
_SENTINEL = -1234
_allvariants = {}
from datetime import datetime
-from gi.repository import Libosinfo as libosinfo
+from gi.repository import Libosinfo as libosinfo # pylint: disable=E0611
_aliases = {
diff --git a/virtinst/urlfetcher.py b/virtinst/urlfetcher.py
index 3c273e3..f67ca47 100644
--- a/virtinst/urlfetcher.py
+++ b/virtinst/urlfetcher.py
@@ -649,7 +649,7 @@ class FedoraDistro(RedHatDistro):
"""
ret = None
for osinfo in osdict.list_os(typename="linux"):
- if osinfo.name.startswith("fedora"):
+ if osinfo.name.startswith("fedora") and "unknown" not in osinfo.name:
# First fedora* occurence should be the newest
ret = osinfo.name
break
--
1.8.5.3
More information about the virt-tools-list
mailing list