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

_clanup() - what is it purpose? #62

Open
kern3020 opened this issue Mar 22, 2013 · 3 comments
Open

_clanup() - what is it purpose? #62

kern3020 opened this issue Mar 22, 2013 · 3 comments

Comments

@kern3020
Copy link

Hello,

There is a method stub called _clanup() in the Figure class which simply raises NotImplementedError. What is the purpose of it?

-jk

@mynameisfiber
Copy link
Collaborator

Cleanup is a function that is called on __exit__ or __del__ for any cleanup necessary. This could be to delete files if we are using the local FS for temporary storage, to clean up any threads we had going or anything else you could want. For example, in the default figure it shuts down the HTTP server and cleans up the threads so that the port is no longer in use: https://github.com/mikedewar/d3py/blob/master/d3py/figure.py#L259

@kern3020
Copy link
Author

Hello Micha,

Yes, I see how exit and del call _cleanup but notice it isn't a typo in the title of this bug report. Consider the _clanup() method on line 85 ttps://github.com/mikedewar/d3py/blob/master/d3py/figure.py#L85 I do not believe it is called. Did I miss something?

-jk

@kern3020
Copy link
Author

Took the liberty of removing this method in my next pull request.

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