Merge lp:~jelmer/brz/python3-interaction into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 7144
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/python3-interaction
Merge into: lp:brz
Diff against target: 20 lines (+2/-1)
1 file modified
breezy/ui/text.py (+2/-1)
To merge this branch: bzr merge lp:~jelmer/brz/python3-interaction
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+358288@code.launchpad.net

Commit message

Fix interactivity on Python 3.

Description of the change

Fix interactivity on Python 3.

To post a comment you must log in.
lp:~jelmer/brz/python3-interaction updated
7144. By Jelmer Vernooij

Fix interactivity on Python 3.

Revision history for this message
Martin Packman (gz) wrote :

Should perhaps use _unwrap_stream() helper?

review: Approve
lp:~jelmer/brz/python3-interaction updated
7145. By Jelmer Vernooij

Use _unwrap_stream.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/ui/text.py'
2--- breezy/ui/text.py 2018-03-24 15:16:49 +0000
3+++ breezy/ui/text.py 2018-11-15 22:31:39 +0000
4@@ -67,7 +67,7 @@
5 """
6 is_tty = self.ui.raw_stdin.isatty()
7 if (os.environ.get('BRZ_TEXTUI_INPUT') != 'line-based' and
8- self.ui.raw_stdin == sys.stdin and is_tty):
9+ self.ui.raw_stdin == _unwrap_stream(sys.stdin) and is_tty):
10 self.line_based = False
11 self.echo_back = True
12 else:
13@@ -332,6 +332,7 @@
14 self.clear_term()
15 self.stdout.flush()
16 self.stderr.write(prompt)
17+ self.stderr.flush()
18
19 def report_transport_activity(self, transport, byte_count, direction):
20 """Called by transports as they do IO.

Subscribers

People subscribed via source and target branches