From: Jouni Malinen Date: Sat, 17 Jan 2015 17:39:23 +0000 (+0200) Subject: tests: Import gobject in a way that allows failures X-Git-Tag: hostap_2_4~374 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4de353c8510b270c786f57da8bcfa28c985f439;p=thirdparty%2Fhostap.git tests: Import gobject in a way that allows failures 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 --- diff --git a/tests/hwsim/test_dbus.py b/tests/hwsim/test_dbus.py index 0ba417f19..43132831d 100644 --- a/tests/hwsim/test_dbus.py +++ b/tests/hwsim/test_dbus.py @@ -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: diff --git a/tests/hwsim/test_dbus_old.py b/tests/hwsim/test_dbus_old.py index e677e78c0..8a76636ee 100644 --- a/tests/hwsim/test_dbus_old.py +++ b/tests/hwsim/test_dbus_old.py @@ -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: