##// END OF EJS Templates
ui: add ui.formatted configuration variable and accessor function....
Dan Villiom Podlaski Christiansen -
r11324:cdf6d861 default
parent child Browse files
Show More
@@ -380,6 +380,21 b' class ui(object):'
380
380
381 return i
381 return i
382
382
383 def formatted(self):
384 if self.plain():
385 return False
386
387 i = self.configbool("ui", "formatted", None)
388 if i is None:
389 try:
390 return sys.stdout.isatty()
391 except AttributeError:
392 # some environments replace stdout without implementing isatty
393 # usually those are non-interactive
394 return False
395
396 return i
397
383 def _readline(self, prompt=''):
398 def _readline(self, prompt=''):
384 if sys.stdin.isatty():
399 if sys.stdin.isatty():
385 try:
400 try:
General Comments 0
You need to be logged in to leave comments. Login now