• R. David Murray's avatar
    Issue 7835: Shelve's __del__ method calls its close method, and its · 63e4fd7e
    R. David Murray authored
    close method refers to an identifier in the global module namespace.
    This means that when __del__ is called during interpreter shutdown (if,
    for example, the calling program still has a pointer to the shelf),
    sometimes that global identifier would wind up being None, causing
    mysterious 'ignored' exceptions.  This patch checks for the possible None
    value first before using the global, thus avoiding the error messages.
    63e4fd7e
NEWS 195 KB