From 363c8de2ddbffd25e8fb066c7c4155aa7aa951d6 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 27 Sep 2012 22:14:29 +0300 Subject: [PATCH] test: Fix fd handling in test-profile --- test/test-profile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test-profile b/test/test-profile index 2aa8d7186..2d664445f 100755 --- a/test/test-profile +++ b/test/test-profile @@ -4,6 +4,7 @@ from __future__ import absolute_import, print_function, unicode_literals from gi.repository import GObject +import os import sys import dbus import dbus.service @@ -25,7 +26,9 @@ class Profile(dbus.service.Object): @dbus.service.method("org.bluez.Profile", in_signature="oh", out_signature="") def NewConnection(self, path, fd): + fd = fd.take() print("NewConnection(%s, %d)" % (path, fd)) + os.close(fd) if __name__ == '__main__': dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) -- 2.47.3