|
@ -65,11 +65,11 @@ class Serial(object): |
|
|
#self.alive = False |
|
|
#self.alive = False |
|
|
#raise |
|
|
#raise |
|
|
|
|
|
|
|
|
def add_callback(self, cmd, callback, arg=None): |
|
|
def add_callback(self, cmd, callback, arg): |
|
|
if not cmd in self._callbacks: |
|
|
if not cmd in self._callbacks: |
|
|
self._callbacks[cmd] = [] |
|
|
self._callbacks[cmd] = [] |
|
|
self._callbacks[cmd].append( (callback, arg) ) |
|
|
self._callbacks[cmd].append( (callback, arg) ) |
|
|
|
|
|
|
|
|
def del_callback(self, cmd, callback, arg=None): |
|
|
def del_callback(self, cmd, callback, arg): |
|
|
if cmd in self._callbacks: |
|
|
if cmd in self._callbacks: |
|
|
self._callbacks[cmd].remove( (callback, arg) ) |
|
|
self._callbacks[cmd].remove( (callback, arg) ) |
|
|