os.isatty isn't available on Windows, so use sys.stdin.isatty()
authorThomas Arendsen Hein <thomas@intevation.de>
Wed, 01 Aug 2007 10:33:21 +0200
changeset 5039 c87de77a7d9f
parent 5038 8f157190075e
child 5040 4f34d9b2568e
os.isatty isn't available on Windows, so use sys.stdin.isatty()
mercurial/ui.py
--- a/mercurial/ui.py	Tue Jul 31 17:18:59 2007 -0700
+++ b/mercurial/ui.py	Wed Aug 01 10:33:21 2007 +0200
@@ -66,7 +66,7 @@
 
     def isatty(self):
         if ui._isatty is None:
-            ui._isatty = os.isatty(sys.stdin.fileno())
+            ui._isatty = sys.stdin.isatty()
         return ui._isatty
 
     def updateopts(self, verbose=False, debug=False, quiet=False,