hotssh r22 - trunk/hotssh



Author: walters
Date: Sat Jul 12 17:45:32 2008
New Revision: 22
URL: http://svn.gnome.org/viewvc/hotssh?rev=22&view=rev

Log:
Redirect background check output to null device


Modified:
   trunk/hotssh/sshwindow.py

Modified: trunk/hotssh/sshwindow.py
==============================================================================
--- trunk/hotssh/sshwindow.py	(original)
+++ trunk/hotssh/sshwindow.py	Sat Jul 12 17:45:32 2008
@@ -640,7 +640,9 @@
         starttime = time.time()
         # This is a hack.  Blame Adam Jackson.
         cmd.extend(['-oBatchMode=true', host, '/bin/true'])
-        subproc = subprocess.Popen(cmd, stdout=None, stderr=None)
+        nullf = open(os.path.devnull, 'w')
+        subproc = subprocess.Popen(cmd, stdout=nullf, stderr=subprocess.STDOUT)
+        nullf.close()
         child_watch_id = gobject.child_watch_add(subproc.pid, self.__on_check_exited, host)
         timeout_id = gobject.timeout_add(7000, self.__check_timeout, host)
         self.__check_statuses[host] = (starttime, subproc.pid, timeout_id, child_watch_id)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]