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

Fix a few ResourceWarnings in idle

parent c3cec786
...@@ -145,6 +145,7 @@ class IdleUserConfParser(IdleConfParser): ...@@ -145,6 +145,7 @@ class IdleUserConfParser(IdleConfParser):
except IOError: except IOError:
os.unlink(fname) os.unlink(fname)
cfgFile = open(fname, 'w') cfgFile = open(fname, 'w')
with cfgFile:
self.write(cfgFile) self.write(cfgFile)
else: else:
self.RemoveFile() self.RemoveFile()
......
...@@ -534,6 +534,10 @@ class RPCClient(SocketIO): ...@@ -534,6 +534,10 @@ class RPCClient(SocketIO):
def get_remote_proxy(self, oid): def get_remote_proxy(self, oid):
return RPCProxy(self, oid) return RPCProxy(self, oid)
def close(self):
self.listening_sock.close()
SocketIO.close(self)
class RPCProxy(object): class RPCProxy(object):
__methods = None __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