codeql repo
#!/usr/bin/env python#This file needs to be able to handle all versions of Python we are likely to encounter#Which is probably 2.6 and upwards'''This module sets up sys.path from the environmentand runs the populator when called from semmle tools such as buildSnapshot.'''import sysimport os# The constant is put here instead of make_zips.py, since make_zips.py is not present in# the distributed extractor-python codedef getzipfilename():return 'python3src.zip'def load_library():try:tools = os.environ['ODASA_TOOLS']except KeyError:try:tools = os.path.join(os.environ['SEMMLE_DIST'], "tools")except KeyError:tools = sys.path[0]try:zippath = os.path.join(tools, getzipfilename())sys.path = [ zippath ] + sys.pathexcept Exception:#Failed to find tools. Error is reported belowzippath = toolstry:import semmle.populatorexcept ImportError as ex:print("FATAL ERROR: ")print(ex)if tools is not None:if not os.path.exists(os.path.join(tools, getzipfilename())):sys.stderr.write("No tracer library found in " + tools + "\n")else:sys.stderr.write("Unable to load tracer library at %s:\n" % zippath)import tracebacktraceback.print_exc(file=sys.stderr)else:print(sys.path)sys.stderr.write("Cannot find Semmle tools\n")sys.exit(2)if __name__ == "__main__":original_path = sys.pathload_library()import semmle.populatorsemmle.populator.main(original_path)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。