Hi alfrix.then, you'll have to fixup the module for your use case as i did, i would start by changing that if/else of addr_to_python to a try/except
Sorry to bother again but you're the only one I know that seems to know their way around NetworkManager.py.
I've tried multiple approaches to eliminate the errors in my code but with no success, I've tried a modified version of addr_to_python() function like this:
Code:
def addr_to_python(addr, family): try: if family == socket.AF_INET: # Convert IP address string to packed binary format packed_addr = socket.inet_aton(addr) # Use struct.pack to pack the binary address into a packed string packed_string = struct.pack('I', struct.unpack('!I', packed_addr)[0]) # Convert the packed string back to a human-readable format return socket.inet_ntop(family, packed_string) except: return socket.inet_ntop(family, b''.join(addr))
Code:
({'802-11-wireless': {'band': 'bg', 'mode': 'ap', 'ssid': [dbus.Byte(74), dbus.Byte(76), dbus.Byte(65), dbus.Byte(45)...
Can you offer some further guidance on this issue?
Thank you for the assistance!
Statistics: Posted by gabriel_sapinto — Wed Mar 06, 2024 5:56 pm