From 865eaa243da384ca35c6bab62d3c381f3d210d4d Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 13 May 2014 19:08:53 -0600 Subject: [PATCH] Removed creation of NUL file, annoying to get rid of. Also changed error formatting a little. --- p4RemoveUnversioned.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/p4RemoveUnversioned.py b/p4RemoveUnversioned.py index f16adf8..67ec4b8 100644 --- a/p4RemoveUnversioned.py +++ b/p4RemoveUnversioned.py @@ -206,7 +206,7 @@ class Console( threading.Thread ): def main( args ): # check requirements - if os.system( 'p4 > Nul' ) != 0: + if os.system( 'p4 -V' ) != 0: print( 'Perforce Command-line Client(p4) is required for this script.' ) sys.exit( 1 ) @@ -259,9 +259,9 @@ def main( args ): os.remove( path ) remove_count += 1 except OSError as ex: - c.writeflush( "| " + type( ex ).__name__ ) - c.writeflush( "| " + repr( ex ) ) - c.writeflush( "|ERROR." ) + c.writeflush( "| " + type( ex ).__name__ ) + c.writeflush( "| " + repr( ex ) ) + c.writeflush( "| ^ERROR^" ) error_count += 1 @@ -274,7 +274,7 @@ def main( args ): output += " w/ " + str( warning_count ) + " warning/s" if error_count > 0: - output += " w/ " + str( error_count ) + " errors/s" + output += " w/ " + str( error_count ) + " error/s" c.write( output + "." )