Skip to content

Conversation

@apt-shansen
Copy link

During shutdown, module globals can be set to None before del is called, so when using del you need to explicitly keep references to those things you need for cleanup purposes.

Without this, I sometimes get "AttributeError: NoneType has no attribute 'name'" and the cleanup code doesn't get called, because its testing "if os.name == 'nt'". (This might just be a Python 2.7 issue: I don't remember when cleanup started explicitly setting globals to None)

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

Successfully merging this pull request may close these issues.

1 participant