diff --git a/gio/tests/memory-monitor-dbus.py.in b/gio/tests/memory-monitor-dbus.py.in index bf3291847..25df1ebbb 100755 --- a/gio/tests/memory-monitor-dbus.py.in +++ b/gio/tests/memory-monitor-dbus.py.in @@ -73,8 +73,7 @@ try: printed on failure. ''' while timeout >= 0: - context = GLib.MainContext.default() - while context.iteration(False): + while self.main_context.iteration(False): pass if condition(): break diff --git a/gio/tests/power-profile-monitor-dbus.py.in b/gio/tests/power-profile-monitor-dbus.py.in index 06e594f4a..1cd029d22 100755 --- a/gio/tests/power-profile-monitor-dbus.py.in +++ b/gio/tests/power-profile-monitor-dbus.py.in @@ -73,8 +73,7 @@ try: printed on failure. ''' while timeout >= 0: - context = GLib.MainContext.default() - while context.iteration(False): + while self.main_context.iteration(False): pass if condition(): break