Browse code

Revert "Read stdin automatically when it's not a tty."

This reverts commit bd016bc662081afd8ce6b01a5ad2715c8eb780a8.

Fixes https://github.com/jrfonseca/xdot.py/issues/14 .

José Fonseca authored on 24/10/2014 12:59:48
Showing 1 changed files

  • xdot.py index 4cd2035..413f207 100755
... ...
@@ -2114,10 +2114,7 @@ Shortcuts:
2114 2114
     win = DotWindow()
2115 2115
     win.connect('destroy', gtk.main_quit)
2116 2116
     win.set_filter(options.filter)
2117
-    if len(args) == 0:
2118
-        if not sys.stdin.isatty():
2119
-            win.set_dotcode(sys.stdin.read())
2120
-    else:
2117
+    if len(args) >= 1:
2121 2118
         if args[0] == '-':
2122 2119
             win.set_dotcode(sys.stdin.read())
2123 2120
         else: