Skip to content

Commit 7197b7f

Browse files
authored
Merge pull request brendan-w#145 from LightSoar/patch-1
Add __repr__ to OBDCommand
2 parents c2b8353 + 9a08d54 commit 7197b7f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

obd/OBDCommand.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ def __constrain_message_data(self, message):
114114

115115
def __str__(self):
116116
return "%s: %s" % (self.command, self.desc)
117+
118+
def __repr(self):
119+
return "OBDCommand(%s, %s)" % (self.name, self.command)
117120

118121
def __hash__(self):
119122
# needed for using commands as keys in a dict (see async.py)

0 commit comments

Comments
 (0)