##// END OF EJS Templates
make ui.interactive() return false in case stdin lacks isatty
Ronny Pfannschmidt -
r10077:89617aac default
parent child Browse files
Show More
@@ -253,7 +253,13 b' class ui(object):'
253 def interactive(self):
253 def interactive(self):
254 i = self.configbool("ui", "interactive", None)
254 i = self.configbool("ui", "interactive", None)
255 if i is None:
255 if i is None:
256 return sys.stdin.isatty()
256 try:
257 return sys.stdin.isatty()
258 except AttributeError:
259 # some environments replace stdin without implementing isatty
260 # usually those are non-interactive
261 return False
262
257 return i
263 return i
258
264
259 def _readline(self, prompt=''):
265 def _readline(self, prompt=''):
General Comments 0
You need to be logged in to leave comments. Login now