| 248 | capture_callstack = True |
| 249 | |
| 250 | def get_client_version_head(path): |
| 251 | cmd = 'python3' + ' ' + os.path.join(path, 'tools', 'donate-cpu.py') + ' ' + '--version' |
| 252 | with subprocess.Popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, universal_newlines=True) as p: |
| 253 | try: |
| 254 | # TODO: handle p.returncode? |
| 255 | stdout, _ = p.communicate() |
| 256 | except: |
| 257 | return None |
| 258 | return stdout.strip() |
| 259 | |
| 260 | client_version_head = get_client_version_head(tree_path) |
| 261 | c, errout, info, t, cppcheck_options, timing_info = lib.scan_package(tree_path, source_path, libraries, capture_callstack) |