diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2012-09-27 22:14:29 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-09-27 22:15:39 +0300 |
commit | 363c8de2ddbffd25e8fb066c7c4155aa7aa951d6 (patch) | |
tree | 460bf419819b4ab96b3c35627a9c497024dc1630 /test | |
parent | 57a2ff308fe7d8cedfb64366fd73a582787b7396 (diff) | |
download | bluez-363c8de2ddbffd25e8fb066c7c4155aa7aa951d6.tar.gz |
test: Fix fd handling in test-profile
Diffstat (limited to 'test')
-rwxr-xr-x | test/test-profile | 3 |
1 files changed, 3 insertions, 0 deletions
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) |