mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 12:34:55 +00:00
tests: avoid deprecated GLib.IOChannel.add_watch() in "test-networkmanager-service.py"
test_001 (__main__.TestNmcli) ... /tmp/NetworkManager/tools/test-networkmanager-service.py:2346: PyGIDeprecationWarning: add_watch is deprecated; use GLib.io_add_watch() instead id1 = GLib.IOChannel(0).add_watch(GLib.IOCondition.HUP,
This commit is contained in:
parent
85bdf42112
commit
ceae05cc4b
|
@ -2343,8 +2343,10 @@ def main():
|
|||
raise AssertionError("Failure to request D-Bus name org.freedesktop.NetworkManager")
|
||||
|
||||
# Watch stdin; if it closes, assume our parent has crashed, and exit
|
||||
id1 = GLib.IOChannel(0).add_watch(GLib.IOCondition.HUP,
|
||||
lambda io, condition: gl.mainloop.quit() or True)
|
||||
id1 = GLib.io_add_watch(GLib.IOChannel.unix_new(0),
|
||||
GLib.PRIORITY_DEFAULT,
|
||||
GLib.IO_HUP,
|
||||
lambda io, condition: gl.mainloop.quit() or True)
|
||||
|
||||
gl.mainloop.run()
|
||||
|
||||
|
|
Loading…
Reference in a new issue