mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Validate -j option is positive
This commit is contained in:
parent
cdb31585a8
commit
ddcb45dad6
@ -94,7 +94,11 @@ def jobs_argument(value):
|
||||
if value == 'auto':
|
||||
return multiprocessing.cpu_count()
|
||||
else:
|
||||
return int(value)
|
||||
jobs = int(value)
|
||||
if jobs <= 0:
|
||||
raise argparse.ArgumentTypeError('job number should be a positive number')
|
||||
else:
|
||||
return jobs
|
||||
|
||||
|
||||
def get_parser():
|
||||
|
Loading…
Reference in New Issue
Block a user