Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.6 - xrange not defined #47

Open
Eriobis opened this issue Jan 3, 2018 · 0 comments
Open

Python 3.6 - xrange not defined #47

Eriobis opened this issue Jan 3, 2018 · 0 comments

Comments

@Eriobis
Copy link

Eriobis commented Jan 3, 2018

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])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant