Fixed comparison issue, apparently had to make sure the number was an int.
Stupid fucking error.
This commit is contained in:
parent
55e5033794
commit
972e9ca689
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue