Skip to content

Commit

Permalink
Fix <class 'AttributeError'>: module 'random' has no attribute 'randb…
Browse files Browse the repository at this point in the history
…ytes'
  • Loading branch information
tov101 committed Oct 17, 2023
1 parent 9ffad48 commit 21d695a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/asammdf/gui/widgets/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ def open_menu(self):
for item in self.selectedItems():
if item.type() == ChannelsTreeItem.Channel:
while True:
rgb = random.randbytes(3)
rgb = os.urandom(3)
if 100 <= sum(rgb) <= 650:
break

Expand Down

0 comments on commit 21d695a

Please sign in to comment.