git.samba.org
/
tpot
/
bbremote.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
535a80d
)
Fix error handling in initial connection.
author
Tim Potter
<tpot@hp.com>
Tue, 8 Apr 2008 03:13:46 +0000
(13:13 +1000)
committer
Tim Potter
<tpot@hp.com>
Tue, 8 Apr 2008 03:13:46 +0000
(13:13 +1000)
Don't forget that addCallback(fn1) followed by addErrback(fn2) doesn't do
quite what you think. Use addCallbacks(fn1, fn2) instead.
bbmodel.py
patch
|
blob
|
history
diff --git
a/bbmodel.py
b/bbmodel.py
index d88fb381e4d3f7ea24bd08deac177f21822c7365..9b221914d67e167735afe6668d710dac92dec6a7 100644
(file)
--- a/
bbmodel.py
+++ b/
bbmodel.py
@@
-133,8
+133,7
@@
class BBModel(pb.Referenceable):
d = cf.login(creds)
reactor.connectTCP(host, port, cf)
- d.addCallback(self.connected)
- d.addErrback(lambda arg: log.err(arg))
+ d.addCallbacks(self.connected, lambda arg: log.err(arg))
log.msg('connecting to %s:%d as %s' % (host, port, username))