changeset 30814 | b96c57c1f860 |
parent 30641 | 16b5df5792a8 |
child 30832 | da5fa0f13a41 |
--- a/mercurial/ui.py Fri Jan 13 23:21:10 2017 -0800 +++ b/mercurial/ui.py Sat Jan 14 20:31:35 2017 +0900 @@ -972,7 +972,10 @@ # disable getpass() only if explicitly specified. it's still valid # to interact with tty even if fin is not a tty. if self.configbool('ui', 'nontty'): - return self.fin.readline().rstrip('\n') + l = self.fin.readline() + if not l: + raise EOFError + return l.rstrip('\n') else: return getpass.getpass('') except EOFError: