Skip to content
This repository was archived by the owner on Feb 5, 2026. It is now read-only.
Open
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ You can contribute in many ways:
```shell
$ py.test
```
6. If execute py.test and always collect 0 items, then you can try to run

6. Commit your changes and push your branch to GitHub::
if your install success and execute just like you expect, then you can suggest that you have already pass the test.

7. Commit your changes and push your branch to GitHub::

```shell
$ git add .
Expand Down
3 changes: 3 additions & 0 deletions PyBeacon/PyBeacon.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def encodeurl(url):
data.append(s)
i += len(scheme)
break
"""if never match to if, then throw exception."""
else:
raise Exception("Invalid url scheme")

Expand Down Expand Up @@ -111,6 +112,7 @@ def encodeUid(uid):
ret = []
for i in range(0, len(uid), 2):
ret.append(int(uid[i:i+2], 16))
"""Python's final character"""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to Final byte stream character in Python

ret.append(0x00)
ret.append(0x00)
return ret
Expand All @@ -119,6 +121,7 @@ def uidIsValid(uid):
"""UID Validation."""
if len(uid) == 32:
try:
"""UID characters must belong to base 16"""
int(uid, 16)
return True
except ValueError:
Expand Down