From 41f29ccd9e5c3bb0a61236212dd448a01ac8e649 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 23 May 2019 08:39:18 -0400 Subject: [PATCH] Parse command-line args in a separate function. --- tools/mkdoc.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/mkdoc.py b/tools/mkdoc.py index dd954ddcf..44164af3d 100755 --- a/tools/mkdoc.py +++ b/tools/mkdoc.py @@ -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)