Closed Bug 1762487 Opened 2 years ago Closed 2 years ago

robustcheckout uses context manager improperly when capturing some metrics

Categories

(Developer Services :: Mercurial: robustcheckout, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sheehan, Assigned: sheehan)

References

(Regression)

Details

The changes in this patch are an improper use of context managers and result in an AttributeError: __enter__ as seen in bug 1760840.

Somehow this works in the test suite. This will require some investigation, but in the meantime we should fix the context manager.

(In reply to Connor Sheehan [:sheehan] from comment #0)

Somehow this works in the test suite. This will require some investigation, but in the meantime we should fix the context manager.

It works in the test suite because the with (man1, man2): syntax works in Python 3.9+ and that's the version of Python that's running in the test suite for non-Docker tests.

Pushed by cosheehan@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/0739c51de7e7
robustcheckout: use pre-Py3.9 with syntax for multiple context managers

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.