summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2012-09-27 22:14:29 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2012-09-27 22:15:39 +0300
commit363c8de2ddbffd25e8fb066c7c4155aa7aa951d6 (patch)
tree460bf419819b4ab96b3c35627a9c497024dc1630 /test
parent57a2ff308fe7d8cedfb64366fd73a582787b7396 (diff)
downloadbluez-363c8de2ddbffd25e8fb066c7c4155aa7aa951d6.tar.gz
test: Fix fd handling in test-profile
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-profile3
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)