Try again.
This commit is contained in:
parent
1c6a16c2fb
commit
746f067772
1 changed files with 9 additions and 7 deletions
16
vigil
16
vigil
|
|
@ -922,6 +922,8 @@ def main(root_path, loop, worker_count=None, is_sandboxed=True,
|
|||
editor_command=None, theme=None, is_being_tested=False):
|
||||
if worker_count is None:
|
||||
worker_count = multiprocessing.cpu_count()
|
||||
if theme is None:
|
||||
theme = "native"
|
||||
os.environ["PYGMENT_STYLE"] = theme
|
||||
pickle_path = os.path.join(tools.CACHE_PATH, "summary.pickle")
|
||||
jobs_added_event = asyncio.Event()
|
||||
|
|
@ -1007,15 +1009,15 @@ def check_arguments():
|
|||
print("--sandbox argument must be 'on' or 'off'")
|
||||
sys.exit(1)
|
||||
is_sandboxed = arguments["--sandbox"] in ["on", None]
|
||||
theme = ("native" if arguments["--theme"] is None
|
||||
else arguments["--theme"])
|
||||
themes = list(pygments.styles.get_all_styles())
|
||||
if theme not in themes:
|
||||
print("--theme must be one of: %s" % " ".join(themes))
|
||||
sys.exit(1)
|
||||
if arguments["--theme"] is not None:
|
||||
themes = list(pygments.styles.get_all_styles())
|
||||
if arguments["--theme"] not in themes:
|
||||
print("--theme must be one of: %s" % " ".join(themes))
|
||||
sys.exit(1)
|
||||
editor_command = arguments["--editor"] or os.environ.get("EDITOR", None)\
|
||||
or os.environ.get("VISUAL", None)
|
||||
return root_path, worker_count, is_sandboxed, editor_command, theme
|
||||
return root_path, worker_count, is_sandboxed, editor_command, \
|
||||
arguments["--theme"]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue