Skip to content

xrange does not exist in python3 #3

Description

@Learath

File "libhackrf.py", line 525, in get_serial_no
for i in xrange(0,4):
NameError: name 'xrange' is not defined

This is an easy fix - for python3 the 'range' function is identical.

Digging in a bit further, it looks like the hex function also differs very slightly between python2 and python3, with an L appended in python2, which is removed by the -1 in sn_str += hex(sni)[2:-1]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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