Skip to content
Myr

Fixed a bug with click.edit and None as text.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent c6872ec · Browse files · 1 file+2 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:click/_termui_impl.py+2 added-1 removed
332 unmodified lines
333334 def edit(self, text):335 import tempfile336337 text = text or ''337 if not text.endswith('\n'):338 if text and not text.endswith('\n'):339 text += '\n'340341 fd, name = tempfile.mkstemp(prefix='editor-', suffix=self.extension)342 try:
74 unmodified lines