From 3eb7a78339817c21edcce04ce7bc4c1f66c3c9c5 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 9 May 2014 11:12:41 -0600 Subject: [PATCH] Fixed a serious output bug, buffers weren't being cleared after flushed. So I obviously feel much better about this version, looks like it works how it should. --- p4RemoveUnversioned.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/p4RemoveUnversioned.py b/p4RemoveUnversioned.py index d5cbb3a..c5a918a 100644 --- a/p4RemoveUnversioned.py +++ b/p4RemoveUnversioned.py @@ -116,10 +116,11 @@ class Console( threading.Thread ): if pid in self.buffers: for line in self.buffers[ pid ]: print( line ) + self.buffers.pop( pid, None ) elif event == Console.MSG.CLEAR: pid = data[ 1 ] if pid in self.buffers: - del self.buffers[ pid ] + self.buffers.pop( pid, None ) class Worker( threading.Thread ): def __init__( self, console, queue, files_to_ignore ): @@ -173,7 +174,7 @@ class Worker( threading.Thread ): files = [] command = "p4 fstat *" - proc = subprocess.Popen( command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=directory ) + proc = subprocess.Popen( command.split( ), stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=directory ) (out, err) = proc.communicate() for line in err.decode('utf-8').split( os.linesep ):