Skip to content

Commit

Permalink
Merge pull request #25 from isi-mfurer/fix-callback-unregister
Browse files Browse the repository at this point in the history
client unregister callback did not unregister
  • Loading branch information
isi-mfurer authored Nov 9, 2016
2 parents 0ba0b07 + 75ea0cb commit 4a52359
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions pike/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,10 @@ def unregister_callback(self, event, cb):
"""
ev = Events(event)
if ev not in self.callbacks:
self.callbacks[ev] = []
self.callbacks[ev].append(cb)
return
if cb not in self.callbacks[ev]:
return
self.callbacks[ev].remove(cb)

def connect(self, server, port=445):
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def run_setup(with_extensions):
ext_modules.append(lw_krb_module)
cmdclass = dict(cmdclass, build_ext=ve_build_ext)
setup(name='Pike',
version='0.2.2',
version='0.2.2.1',
description='Pure python SMB client',
author='Brian Koropoff',
author_email='[email protected]',
Expand Down

0 comments on commit 4a52359

Please sign in to comment.