Skip to content

Commit

Permalink
Bluez module: Expose family, type, proto and timeout read-only attrib…
Browse files Browse the repository at this point in the history
…utes in BluetoothSocket
  • Loading branch information
Benoit Bregeault authored and rgov committed Jul 12, 2019
1 parent d65fb64 commit 9d52f97
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bluetooth/bluez.py
Expand Up @@ -244,6 +244,14 @@ def set_l2cap_mtu(self, mtu):
exec( _s % (_m, _m, _m, _m))
del _m, _s

# import readonly attributes from the wrapped socket object
_s = ("@property\ndef %s (self): \
return self._sock.%s")
for _m in ('family', 'type', 'proto', 'timeout'):
exec( _s % (_m, _m))
del _m, _s


def advertise_service (sock, name, service_id = "", service_classes = [], \
profiles = [], provider = "", description = "", protocols = []):
if service_id != "" and not is_valid_uuid (service_id):
Expand Down

0 comments on commit 9d52f97

Please sign in to comment.