mirror of
https://github.com/python/cpython
synced 2024-09-23 01:23:46 +00:00
Fix a few ResourceWarnings in idle
This commit is contained in:
parent
c3cec7868b
commit
bbe7b0ad2a
|
@ -145,7 +145,8 @@ def Save(self):
|
|||
except IOError:
|
||||
os.unlink(fname)
|
||||
cfgFile = open(fname, 'w')
|
||||
self.write(cfgFile)
|
||||
with cfgFile:
|
||||
self.write(cfgFile)
|
||||
else:
|
||||
self.RemoveFile()
|
||||
|
||||
|
|
|
@ -534,6 +534,10 @@ def accept(self):
|
|||
def get_remote_proxy(self, oid):
|
||||
return RPCProxy(self, oid)
|
||||
|
||||
def close(self):
|
||||
self.listening_sock.close()
|
||||
SocketIO.close(self)
|
||||
|
||||
class RPCProxy(object):
|
||||
|
||||
__methods = None
|
||||
|
|
Loading…
Reference in a new issue