Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object delete should probably check existence before close #4

Open
jeanconn opened this issue Jul 21, 2014 · 5 comments
Open

Object delete should probably check existence before close #4

jeanconn opened this issue Jul 21, 2014 · 5 comments

Comments

@jeanconn
Copy link
Contributor

I think the recursive runtime errors can occur because the __del__ method does not check to see if ftp is an attribute of self before trying to close it.

def __del__(self):
    """
    Delete object
    """
    self.ftp.close()
@jeanconn
Copy link
Contributor Author

This filled up a bunch of the timelines/cmd_states log when lucky was down on Wednesday:

<<2016-Aug-24 10:13>> paramiko.ssh_exception.SSHException: Unable to connect to lucky: [Errno 110] Connection timed out
<<2016-Aug-24 10:13>> Closing remaining open files: /proj/sot/ska/data/cmd_states/cmd_states.h5... done
<<2016-Aug-24 10:13>> Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <bound method SFTP.__del__ of <Ska.ftp.SFT
P object at 0x2b47d35f5310>> ignored
<<2016-Aug-24 10:13>> Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <bound method SFTP.__del__ of <Ska.ftp.SFT
P object at 0x2b47d35f5310>> ignored
<<2016-Aug-24 10:13>> Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <bound method SFTP.__del__ of <Ska.ftp.SFT
P object at 0x2b47d35f5310>> ignored
<<2016-Aug-24 10:13>> Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <bound method SFTP.__del__ of <Ska.ftp.SFT
P object at 0x2b47d35f5310>> ignored

@taldcroft
Copy link
Member

I guess putting that in a try block with except:pass would work.

@taldcroft
Copy link
Member

Still having problems that might be related to this. I recently I have been getting fails on kadi because of Ska.ftp having a problem deleting the object at the end. Not sure where to go with this...

@jeanconn
Copy link
Contributor Author

I had a plan to dig into #14 at some point, but, like our sqlite issue, I had a little trouble reliably creating the problem.

@jeanconn
Copy link
Contributor Author

Probably worth noting in this issue that #12 was reverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants