MCPcopy Create free account
hub / github.com/cztomczak/cefpython / get_version_from_command_line_args

Function get_version_from_command_line_args

tools/common.py:433–447  ·  view source on GitHub ↗
(caller_script, ignore_error=False)

Source from the content-addressed store, hash-verified

431
432
433def get_version_from_command_line_args(caller_script, ignore_error=False):
434 args = " ".join(sys.argv)
435 match = re.search(r"\b(\d+)\.\d+\b", args)
436 if match:
437 version = match.group(0)
438 major = match.group(1)
439 cef_version = get_cefpython_version()
440 if major != cef_version["CHROME_VERSION_MAJOR"]:
441 if ignore_error:
442 return ""
443 print("[{script}] ERROR: cmd arg major version != Chrome version"
444 .format(script=os.path.basename(caller_script)))
445 sys.exit(1)
446 return version
447 return
448
449
450def get_cefpython_version():

Callers 5

command_line_argsFunction · 0.85
command_line_argsFunction · 0.85
command_line_argsFunction · 0.85
_detect_distrib_dirFunction · 0.85

Calls 1

get_cefpython_versionFunction · 0.85

Tested by

no test coverage detected