Help with capturing error

tekion tekion at gmail.com
Thu Nov 27 15:33:53 EST 2008


Hello,
I am getting the following error and my script is bailing out because
of it. I have tried capturing it but it does not seem to work.  Below
is the error:

ValueError: I/O operation on closed file


the above error is received when, the following code snippet is
executed:
                try:
    117          self.xml_file.close()
    118       except ValueError:
    119          print "file, %s is already closed" % self.seek_file

Any idea why line 118, is not capturing the error? Thanks.



More information about the Python-list mailing list