##// END OF EJS Templates
osutil: implement __enter__ and __exit__ on posixfile...
Gregory Szorc -
r27704:051b0dce default
parent child Browse files
Show More
@@ -254,3 +254,9 b' else:'
254 f = posixfile('foo.txt')
254 f = posixfile('foo.txt')
255 f.name = 'bla' '''
255 f.name = 'bla' '''
256 return self._file.__setattr__(name, value)
256 return self._file.__setattr__(name, value)
257
258 def __enter__(self):
259 return self._file.__enter__()
260
261 def __exit__(self, exc_type, exc_value, exc_tb):
262 return self._file.__exit__(exc_type, exc_value, exc_tb)
General Comments 0
You need to be logged in to leave comments. Login now