colbyga / pychess

Automatically exported from code.google.com/p/pychess
GNU General Public License v3.0
0 stars 0 forks source link

Bug in ic onCancel #389

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. disable accessing freechess.org
2. startpychess
3. try to connect to fics
4. cancel it

What is the expected output? What do you see instead?

cancel the connect try

Did you use an installed version of PyChess or did you run in from a
tarball/svn?

svn trunk

  File "/home/tamas/svn/pychess/lib/pychess/ic/ICLogon.py", line 91, in
onCancel
    self.connection.disconnect()
  File "/home/tamas/svn/pychess/lib/pychess/ic/FICSConnection.py", line
228, in disconnect
    self.client.close()
  File "/home/tamas/svn/pychess/lib/pychess/ic/TimeSeal.py", line 46, in close
    self.sock.close()
AttributeError: TimeSeal instance has no attribute 'sock'

What do you think about using the new with statement introduced in Python 2.5
http://docs.python.org/whatsnew/2.6.html#pep-343-the-with-statement
http://jessenoller.com/2009/02/03/get-with-the-program-as-contextmanager-complet
ely-different/

Please attach the latest pychess logfile from ~/.pychess

Original issue reported on code.google.com by gbtami on 10 Feb 2009 at 8:15

GoogleCodeExporter commented 9 years ago
I like the with-statement. It is clean and easy to read. However I'm not sure 
what
python versions distributions are running with. At least for Staunton I think we
should stick with 2.4 support.

Original comment by lobais on 11 Feb 2009 at 1:23

GoogleCodeExporter commented 9 years ago
In gnuenterprise project the policy in similar issues to never require newer 
packages
then the latest stable Debian ships. As Lenny is out with Python 2.5.2, there 
is no
reason to stick with 2.4 anymore. At least i know no distribs containing older
versions than Debian :)

Original comment by gbtami on 17 Feb 2009 at 5:57

GoogleCodeExporter commented 9 years ago
Haha, I like that policy :D
The latest Ubuntu LTS also has 2.5.2.
Still, at the current point in stabalizing, do we really want to change 
something
through all files, that brings no features nor fixes?

Original comment by lobais on 17 Feb 2009 at 8:43

GoogleCodeExporter commented 9 years ago

Original comment by gbtami on 19 Mar 2009 at 8:15

GoogleCodeExporter commented 9 years ago
I support use of 'from __future__ import with_statement', but it didn't seam to 
be
what this issue needed (there was a problem with the connection thread starting 
to late)

Original comment by lobais on 22 Mar 2009 at 1:22