One function

args in amoffat/sh

The author described this change as fix args with context to clean up after an exception is thrown. It counts as a record because the check below fails on the code as it stood at c71f53798 and passes on 22427d733, with nothing else changed between the two runs.

Projectamoffat/sh
Fix saved2016-10-10
Sharing licenceMIT · LICENSE.txt
Change size+4 2

What the code was meant to do, written into the code itself as a docstring

allows us to temporarily override all the special keyword parameters in a with context

The change

88 key = key.lstrip("_")
99 call_args[key] = value
1010
11- yield
12- call_args.update(old_args)
11+ try:
12+ yield
13+ finally:
14+ call_args.update(old_args)

The check that tells the two apart

failpass·test.py::FunctionalTests::test_args_context_exception

Check file test.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before itc71f537980aa4e12aacec98352979070d0a847eb
Broken version dated2016-10-10
Modulesh
Units changedargs
Fingerprint5c003c6051ccb9e4
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in amoffat/sh