]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Import gobject in a way that allows failures
authorJouni Malinen <j@w1.fi>
Sat, 17 Jan 2015 17:39:23 +0000 (19:39 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 18 Jan 2015 10:50:20 +0000 (12:50 +0200)
It looks like the gobject module does not get installed by default for
Python at least on Ubuntu server, so modify the D-Bus test case files to
import this in a way that allows other test cases to be run even without
gobject module being installed.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_dbus.py
tests/hwsim/test_dbus_old.py

index 0ba417f1977682b1e34b73576e21c0cd80b77de3..43132831d71b976518134564b76bfc8f5e3f670b 100644 (file)
@@ -5,13 +5,13 @@
 # See README for more details.
 
 import binascii
-import gobject
 import logging
 logger = logging.getLogger()
 import subprocess
 import time
 
 try:
+    import gobject
     import dbus
     dbus_imported = True
 except ImportError:
index e677e78c0645e72111eb9b8e5e9ce7c18a87727a..8a76636ee36f47b0fcd9406cca7665d12f8f4b55 100644 (file)
@@ -4,11 +4,11 @@
 # This software may be distributed under the terms of the BSD license.
 # See README for more details.
 
-import gobject
 import logging
 logger = logging.getLogger()
 
 try:
+    import gobject
     import dbus
     dbus_imported = True
 except ImportError: