def check_dir(args, dirname, names): car = os.path.basename(dirname) for name in names: (root, ext) = os.path.splitext(name) if root == car and ext == ".xml": # Found config file print "checking", root print "---" path = os.sep.join([options.cars, car]) model = ".".join([os.sep.join([path, car]), "acc"]) check_skins.check_car(options, "human", "1", path, root, model)
(options, args) = parser.parse_args() print "Checking", args[0] print "---" tree = ElementTree().parse(os.sep.join([options.dir, args[0]])) p = tree.find("section/section") for item in list(p): index = item.attrib["name"] for driver in list(item): if (driver.attrib["name"] == "name"): name = driver.attrib["val"] if (driver.attrib["name"] == "car name"): car = driver.attrib["val"] print index, ":", name, "(", car, ")" module = os.path.splitext(args[0])[0] # Check acc model model = ".".join([os.sep.join([options.cars, car, car]), "acc"]) path = os.sep.join([options.dir, index]) check_skins.check_car(options, module, index, path, car, model)
help="report git verison numbers") (options, args) = parser.parse_args() print "Checking", args[0] print "---" tree = ElementTree().parse(os.sep.join([options.dir, args[0]])) p = tree.find("section/section") for item in list(p): index = item.attrib["name"] for driver in list(item): if (driver.attrib["name"] == "name"): name = driver.attrib["val"] if (driver.attrib["name"] == "car name"): car = driver.attrib["val"] print index, ":", name, "(", car, ")" module = os.path.splitext(args[0])[0] # Check acc model model = ".".join([os.sep.join([options.cars, car, car]), "acc"]) path = os.sep.join([options.dir, index]) check_skins.check_car(options, module, index, path, car, model)