mercurial/pure/osutil.py
branchstable
changeset 40940 120ecb17242b
parent 39644 3b421154d2ca
child 42524 f3fa10a5877d
--- a/mercurial/pure/osutil.py	Sat Dec 15 13:54:37 2018 -0500
+++ b/mercurial/pure/osutil.py	Sat Dec 15 14:55:06 2018 -0500
@@ -267,7 +267,8 @@
             return self._file.__setattr__(name, value)
 
         def __enter__(self):
-            return self._file.__enter__()
+            self._file.__enter__()
+            return self
 
         def __exit__(self, exc_type, exc_value, exc_tb):
             return self._file.__exit__(exc_type, exc_value, exc_tb)