mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-01-19 21:23:26 +08:00
Parse command-line args in a separate function.
This commit is contained in:
parent
e0b8bbbce9
commit
41f29ccd9e
@ -232,7 +232,7 @@ class ExtractionThread(Thread):
|
||||
job_semaphore.release()
|
||||
|
||||
|
||||
def extract_all(args):
|
||||
def read_args(args):
|
||||
parameters = []
|
||||
filenames = []
|
||||
if "-x" not in args:
|
||||
@ -277,6 +277,11 @@ def extract_all(args):
|
||||
if len(filenames) == 0:
|
||||
raise NoFilenamesError("args parameter did not contain any filenames")
|
||||
|
||||
return parameters, filenames
|
||||
|
||||
|
||||
def extract_all(args):
|
||||
parameters, filenames = read_args(args)
|
||||
output = []
|
||||
for filename in filenames:
|
||||
thr = ExtractionThread(filename, parameters, output)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user