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:
parent
57f08b3f3a
commit
b4de353c85
2 changed files with 2 additions and 2 deletions
|
@ -5,13 +5,13 @@
|
||||||
# See README for more details.
|
# See README for more details.
|
||||||
|
|
||||||
import binascii
|
import binascii
|
||||||
import gobject
|
|
||||||
import logging
|
import logging
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
import gobject
|
||||||
import dbus
|
import dbus
|
||||||
dbus_imported = True
|
dbus_imported = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
# This software may be distributed under the terms of the BSD license.
|
# This software may be distributed under the terms of the BSD license.
|
||||||
# See README for more details.
|
# See README for more details.
|
||||||
|
|
||||||
import gobject
|
|
||||||
import logging
|
import logging
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
import gobject
|
||||||
import dbus
|
import dbus
|
||||||
dbus_imported = True
|
dbus_imported = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
Loading…
Reference in a new issue