Skip to content
Snippets Groups Projects
Commit 8776f463 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

Task #8887: use open and close methods for clarity

parent 9f23df75
Branches
Tags
No related merge requests found
......@@ -29,15 +29,18 @@ class RARPC:
self._serviceRPCs = {} #cache of rpc's for each service
def __enter__(self):
"""
Internal use only. (handles scope 'with')
"""
"""Internal use only. (handles scope 'with')"""
self.open()
return self
def __exit__(self, exc_type, exc_val, exc_tb):
"""
Internal use only. (handles scope 'with')
"""
"""Internal use only. (handles scope 'with')"""
self.close()
def open(self):
pass
def close(self):
for rpc in self._serviceRPCs.values():
rpc.__exit__(None, None, None)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment