Message ID | 585bdd51b258acbf438efe5a84924977778aff71.1580507895.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | git-p4: add hook p4-pre-edit-changelist | expand |
diff --git a/git-p4.py b/git-p4.py index 40d9e7c594..7d8a5ee788 100755 --- a/git-p4.py +++ b/git-p4.py @@ -175,7 +175,11 @@ def prompt(prompt_text): """ choices = set(m.group(1) for m in re.finditer(r"\[(.)\]", prompt_text)) while True: - response = raw_input(prompt_text).strip().lower() + sys.stderr.flush() + sys.stdout.write(prompt_text) + sys.stdout.flush() + sys.stdin.flush() + response=sys.stdin.readline().strip().lower() if not response: continue response = response[0]