Submitter | Matt Harbison |
---|---|
Date | April 12, 2017, 2:42 a.m. |
Message ID | <ef3aa25da8e5b3137b91.1491964962@Envy> |
Download | mbox | patch |
Permalink | /patch/20125/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/windows.py b/mercurial/windows.py --- a/mercurial/windows.py +++ b/mercurial/windows.py @@ -64,6 +64,12 @@ object.__setattr__(self, r'_fp', fp) object.__setattr__(self, r'_lastop', 0) + def __enter__(self): + return self._fp.__enter__() + + def __exit__(self, exc_type, exc_val, exc_tb): + self._fp.__exit__(exc_type, exc_val, exc_tb) + def __getattr__(self, name): return getattr(self._fp, name)