From 972e9ca689d96dbc94a548b2d982da908cc948f4 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 9 Jun 2015 10:15:00 -0600 Subject: [PATCH] Fixed comparison issue, apparently had to make sure the number was an int. Stupid fucking error. --- p4Sync.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/p4Sync.py b/p4Sync.py index fb52b18..113422f 100644 --- a/p4Sync.py +++ b/p4Sync.py @@ -28,7 +28,7 @@ class P4Sync: ( options, args ) = parser.parse_args( args ) directory = normpath( options.directory if options.directory is not None else os.getcwd( ) ) - thread_count = options.thread_count if options.thread_count > 0 else multiprocessing.cpu_count( ) + options.thread_count + thread_count = int(options.thread_count if options.thread_count > 0 else multiprocessing.cpu_count( ) + options.thread_count) with Console( auto_flush_time=1 ) as c: with P4Workspace( directory ): @@ -42,8 +42,6 @@ class P4Sync: ('-f ' if options.force else '') + \ ("--parallel=threads=" + str(thread_count) + " " if thread_count > 1 else '') + \ os.path.join(directory, "...") - c.writeflush(thread_count) - c.writeflush(cmd) subprocess.check_output( cmd, shell=True ) except subprocess.CalledProcessError: pass