Skip to content

Commit

Permalink
Print uniq additionally to phys, if available
Browse files Browse the repository at this point in the history
  • Loading branch information
quaxalber committed Dec 10, 2023
1 parent b4db32e commit e7b9dfc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions evdev/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,9 @@ def __eq__(self, other):
and self.path == other.path

def __str__(self):
msg = 'device {}, name "{}", phys "{}"'
return msg.format(self.path, self.name, self.uniq if self.uniq else self.phys)
msg = 'device {}, name "{}", phys "{}"{}'
uniq = ', uniq "{}"'.format(self.uniq) if self.uniq else ''
return msg.format(self.path, self.name, self.phys, uniq)

def __repr__(self):
msg = (self.__class__.__name__, self.path)
Expand Down

0 comments on commit e7b9dfc

Please sign in to comment.