diff --git a/clint/textui/core.py b/clint/textui/core.py index c435391..b61e2c1 100644 --- a/clint/textui/core.py +++ b/clint/textui/core.py @@ -79,8 +79,10 @@ def dedent(): @contextmanager def _indent_context(): """Indentation context manager.""" - yield - dedent() + try: + yield + finally: + dedent() def indent(indent=4, quote=''): """Indentation manager, return an indentation context manager."""