mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Added safeguard against failure in __del__.
This commit is contained in:
parent
bec74843de
commit
29e77816f5
1 changed files with 2 additions and 0 deletions
|
@ -70,6 +70,8 @@ def urlcleanup():
|
||||||
ftpcache = {}
|
ftpcache = {}
|
||||||
class URLopener:
|
class URLopener:
|
||||||
|
|
||||||
|
tempcache = None # So close() in __del__() won't fail
|
||||||
|
|
||||||
# Constructor
|
# Constructor
|
||||||
def __init__(self, proxies=None):
|
def __init__(self, proxies=None):
|
||||||
if proxies is None:
|
if proxies is None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue