Source

thg-qt-mq / blackholer.diff

Full commit
# HG changeset patch
# Parent d9d97b29f4335f0e6ecf96aad771176f40944842
diff --git a/thg b/thg
--- a/thg
+++ b/thg
@@ -11,6 +11,20 @@
 import os
 import sys
 
+class IsattyWrap(object):
+    def __init__(self, obj):
+        self._obj = obj
+
+    def __getattr(self, name):
+        return getattr(self._obj, name)
+
+    def isatty(self):
+        raise AttributeError("'isatty' not defined on %r" % self._obj.name)
+
+sys.stdin = IsattyWrap(sys.stdin)
+sys.stdout = IsattyWrap(sys.stdout)
+sys.stderr = IsattyWrap(sys.stderr)
+
 if hasattr(sys, "frozen"):
     if sys.frozen == 'windows_exe' and 'THGDEBUG' in os.environ:
         import win32traceutil