Skip to content

Python 3.6 - xrange not defined #47

@Eriobis

Description

@Eriobis

the xrange is not defined in python 3, you need to use range instead. Since the division gives a float output, need to cast it into an int
Line 387 to 395 :

                                if this_field[0] == 0x02 or this_field[0] == 0x03: # partial or complete list of 16-bit UUIDs
                                    for i in range(int((len(this_field) - 1) / 2)):
                                        ad_services.append(this_field[-1 - i*2 : -3 - i*2 : -1])
                                if this_field[0] == 0x04 or this_field[0] == 0x05: # partial or complete list of 32-bit UUIDs
                                    for i in range(int((len(this_field) - 1) / 4)):
                                        ad_services.append(this_field[-1 - i*4 : -5 - i*4 : -1])
                                if this_field[0] == 0x06 or this_field[0] == 0x07: # partial or complete list of 128-bit UUIDs
                                    for i in range(int((len(this_field) - 1) / 16)):
                                        ad_services.append(this_field[-1 - i*16 : -17 - i*16 : -1])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions