Commit bbe7b0ad authored by Amaury Forgeot d'Arc's avatar Amaury Forgeot d'Arc

Fix a few ResourceWarnings in idle

parent c3cec786
......@@ -145,7 +145,8 @@ class IdleUserConfParser(IdleConfParser):
except IOError:
os.unlink(fname)
cfgFile = open(fname, 'w')
self.write(cfgFile)
with cfgFile:
self.write(cfgFile)
else:
self.RemoveFile()
......
......@@ -534,6 +534,10 @@ class RPCClient(SocketIO):
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment