From f00b94f18e1d82d1488cbcee6053f03423bc2f49 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sat, 22 Jul 2017 03:02:05 +0000 Subject: Convert to click for CLI options --- src/mailman/testing/helpers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mailman/testing/helpers.py') diff --git a/src/mailman/testing/helpers.py b/src/mailman/testing/helpers.py index af844d214..8bb8e8bdd 100644 --- a/src/mailman/testing/helpers.py +++ b/src/mailman/testing/helpers.py @@ -345,9 +345,9 @@ class configuration: self._values = kws.copy() def _apply(self): - lines = ['[{0}]'.format(self._section)] + lines = ['[{}]'.format(self._section)] for key, value in self._values.items(): - lines.append('{0}: {1}'.format(key, value)) + lines.append('{}: {}'.format(key, value)) config.push(self._uuid, NL.join(lines)) def _remove(self): @@ -355,6 +355,7 @@ class configuration: def __enter__(self): self._apply() + return self def __exit__(self, *exc_info): self._remove() -- cgit v1.2.3-70-g09d2