Skip to content

Commit

Permalink
Merge branch 'bugfixes/py3-patches'
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Mar 11, 2020
2 parents 5ed8091 + 037d43b commit 83fe7be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ dist: trusty
sudo: false
language: python

matrix:
allow_failures:
- python: 3.6

jobs:
fast_finish: true
include:
Expand Down
4 changes: 2 additions & 2 deletions magicbus/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def __init__(self, transitions=None, errors=None,
self.listeners[c] = set()

if id is None:
id = hex(random.randint(0, sys.maxint))[-8:]
id = hex(random.randint(0, sys.maxsize))[-8:]
self.id = id
self._priorities = {}
self._state_transition_pipes = set()
Expand Down Expand Up @@ -202,7 +202,7 @@ def _transition(self, newstate, *args, **kwargs):
# Write to any pipes created by threads calling self.wait().
# Use list() to avoid "Set changed size during iteration" errors.
for read_fd, write_fd in list(self._state_transition_pipes):
os.write(write_fd, "1")
os.write(write_fd, b"1")

# Note: logging here means 1) the initial transition
# will not be logged if loggers are set up in the initial
Expand Down

0 comments on commit 83fe7be

Please sign in to comment.