[virt-tools-list] [osinfo PATCH] Remove unused python gobject import

Christophe Fergeau cfergeau at redhat.com
Wed Nov 30 14:02:34 UTC 2011

Nothing in examples/demo.py uses this import, and having it causes a
runtime error:

Traceback (most recent call last):
  File "examples/demo.py", line 4, in <module>
    from gi.repository import Libosinfo as osinfo;
  File "/usr/lib64/python2.7/site-packages/gi/__init__.py", line 23, in <module>
    from ._gi import _API, Repository
ImportError: could not import gobject (error was: ImportError('When using
gi.repository you must not import static modules like "gobject". Please
change all occurrences of "import gobject" to "from gi.repository import
 examples/demo.py |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/examples/demo.py b/examples/demo.py
index ac09ae7..1aceef3 100755
--- a/examples/demo.py
+++ b/examples/demo.py
@@ -1,6 +1,5 @@
-import gobject
 from gi.repository import Libosinfo as osinfo;
 loader = osinfo.Loader()

More information about the virt-tools-list mailing list