diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-10-17 11:21:34 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-10-17 11:31:31 +0300 |
commit | 09691831380ca7c15cfed3445465e27837c4130d (patch) | |
tree | 230283a3041728afefff825e1e5fb6da019eeb3e /contrib/python/ipython/py3/IPython/utils/terminal.py | |
parent | 68f2bcc600fc15fb8400346624c43d6be3ec81b2 (diff) | |
download | ydb-09691831380ca7c15cfed3445465e27837c4130d.tar.gz |
Intermediate changes
commit_hash:2d9a1d3a3501b70a635f24b69a195c83059b71da
Diffstat (limited to 'contrib/python/ipython/py3/IPython/utils/terminal.py')
-rw-r--r-- | contrib/python/ipython/py3/IPython/utils/terminal.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/python/ipython/py3/IPython/utils/terminal.py b/contrib/python/ipython/py3/IPython/utils/terminal.py index b09cfe0d22d..10d73fce586 100644 --- a/contrib/python/ipython/py3/IPython/utils/terminal.py +++ b/contrib/python/ipython/py3/IPython/utils/terminal.py @@ -80,7 +80,13 @@ def _set_term_title_xterm(title): def _restore_term_title_xterm(): # Make sure the restore has at least one accompanying set. global _xterm_term_title_saved - assert _xterm_term_title_saved + if not _xterm_term_title_saved: + warnings.warn( + "Expecting xterm_term_title_saved to be True, but is not; will not restore terminal title.", + stacklevel=1, + ) + return + sys.stdout.write('\033[23;0t') _xterm_term_title_saved = False |