diff options
author | Simon McVittie <smcv@collabora.com> | 2019-09-02 14:24:36 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2019-09-02 14:24:36 +0100 |
commit | 5e3a97992b206037c137a8cfda1a2c2f18fac45a (patch) | |
tree | e5db58eca7c58cb316d5b44630a0c82a8d45a14a | |
parent | 1825c1dcbd3729bf8bc2101767a82273fcad9c95 (diff) | |
download | dbus-python-5e3a97992b206037c137a8cfda1a2c2f18fac45a.tar.gz |
Fix NO_REPLY test for Python 3
Signed-off-by: Simon McVittie <smcv@collabora.com>
-rwxr-xr-x | test/test-client.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test-client.py b/test/test-client.py index 59e432c..f028ced 100755 --- a/test/test-client.py +++ b/test/test-client.py @@ -209,6 +209,7 @@ class TestDBusBindings(unittest.TestCase): failures = [] report = [] main_loop = gobject.MainLoop() + unicode_type = (str if is_py3 else unicode) def message_filter(conn, m): print('Message filter received message: %r, %r' % (m, m.get_args_list())) @@ -217,7 +218,7 @@ class TestDBusBindings(unittest.TestCase): failures.append('Message filter called on unexpected bus') for a in m.get_args_list(): - if isinstance(a, unicode): + if isinstance(a, unicode_type): if SHOULD_NOT_HAPPEN in a: failures.append('Had an unexpected reply') elif a == 'TestNoReply report': |