forked from auracaster/bumble_mirror
core: change AdvertisingData.get default raw behavior to False
This commit is contained in:
@@ -827,7 +827,7 @@ class AdvertisingData:
|
||||
self.ad_structures.append((ad_type, ad_data))
|
||||
offset += length
|
||||
|
||||
def get(self, type_id, return_all=False, raw=True):
|
||||
def get(self, type_id, return_all=False, raw=False):
|
||||
'''
|
||||
Get Advertising Data Structure(s) with a given type
|
||||
|
||||
|
||||
@@ -1402,9 +1402,9 @@ class Device(CompositeEventEmitter):
|
||||
|
||||
# Scan/inquire with event handlers to handle scan/inquiry results
|
||||
def on_peer_found(address, ad_data):
|
||||
local_name = ad_data.get(AdvertisingData.COMPLETE_LOCAL_NAME)
|
||||
local_name = ad_data.get(AdvertisingData.COMPLETE_LOCAL_NAME, raw=True)
|
||||
if local_name is None:
|
||||
local_name = ad_data.get(AdvertisingData.SHORTENED_LOCAL_NAME)
|
||||
local_name = ad_data.get(AdvertisingData.SHORTENED_LOCAL_NAME, raw=True)
|
||||
if local_name is not None:
|
||||
if local_name.decode('utf-8') == name:
|
||||
peer_address.set_result(address)
|
||||
|
||||
Reference in New Issue
Block a user