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 <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-01-17 19:39:23 +02:00
parent 57f08b3f3a
commit b4de353c85
2 changed files with 2 additions and 2 deletions

View 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:

View 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: