Opened 16 years ago
Closed 16 years ago
#2086 defect closed fixed (fixed)
t.words.basesupport attributeerror when "already connecting"
Reported by: | Cory Dodt | Owned by: | Cory Dodt |
---|---|---|---|
Priority: | highest | Milestone: | |
Component: | words | Keywords: | |
Cc: | corydodt@… | Branch: | |
Author: |
Description
When you attempt to connect a basesupport.AbstractAccount twice, you get an AttributeError, because it attempts to use t.i.error.ConnectionError. The correct exception is t.i.error.ConnectError.
Attaching patch with unit test.
Attachments (1)
Change History (9)
Changed 16 years ago by
Attachment: | basesupport.patch added |
---|
comment:1 Changed 16 years ago by
Keywords: | review removed |
---|---|
Owner: | changed from Stephen Thorne to Cory Dodt |
comment:2 Changed 16 years ago by
Type: | enhancement → defect |
---|
comment:4 Changed 16 years ago by
Keywords: | review added |
---|---|
Owner: | changed from Cory Dodt to Stephen Thorne |
OK, committed r18119 on the branch.
comment:5 Changed 16 years ago by
Owner: | Stephen Thorne deleted |
---|
comment:6 Changed 16 years ago by
Priority: | normal → highest |
---|
comment:7 Changed 16 years ago by
Keywords: | review removed |
---|---|
Owner: | set to Cory Dodt |
Thanks for adding more tests than strictly necessary for this branch.
A few points:
return reason
works just as well asreason.raiseException()
, and better matches the docstring.- test_basesupport.py:61,78,79 are all > 80 columns
- Please add a docstring for test_alreadyConnecting
Please fix all of these things, then merge.
comment:8 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
I created a branch, irc-account-2086, and played around with your patch.
It turns out that the callback chain in .logOn is broken, and will end up calling both _loginFailed and _cb_logOn.
Please see the unit tests I've written in twisted.words.test.test_basesupport.
If you can fix .logOn so it has the expected behaviour (fix the failing unit test), I'd appreciate it. Do you svn commit access? Got Combinator set up?
Mark it back to review and give it back to me when you're done.