[gentoo-portage-dev] [PATCH 1/2] Make atomic_ofstream a Context Manager

2020-12-18 Thread Florian Schmaus
This allows using a "with statement" together with instances of atomic_ofstream. Allowing for more readable, less error prone and shorter code. Signed-off-by: Florian Schmaus --- lib/portage/util/__init__.py | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/portag

[gentoo-portage-dev] [PATCH 2/2] env_update: use "with statement" on atomic_ofstream

2020-12-18 Thread Florian Schmaus
Signed-off-by: Florian Schmaus --- lib/portage/util/env_update.py | 30 -- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/lib/portage/util/env_update.py b/lib/portage/util/env_update.py index dec086cf8c5b..5588931a84e7 100644 --- a/lib/portage/util/env