X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dccf1b41e9c7b5a696f01abceaa2779fe65f154f..6cf6f6913a06a9b7e64923042e25049b529e5cdc:/tools/sg_xml_unit_converter.py diff --git a/tools/sg_xml_unit_converter.py b/tools/sg_xml_unit_converter.py index 8f6c631941..ff81d66575 100644 --- a/tools/sg_xml_unit_converter.py +++ b/tools/sg_xml_unit_converter.py @@ -46,8 +46,8 @@ def format(xml, formats, attrib): return "".join(res) -def formats(list): - return sorted(((Decimal(i), j) for i, j in list), key=lambda x: x[0], reverse=True) +def formats(ll): + return sorted(((Decimal(i), j) for i, j in ll), key=lambda x: x[0], reverse=True) for root, dirnames, filenames in os.walk(sys.argv[1]): for filename in fnmatch.filter(filenames, '*.xml'): @@ -90,6 +90,6 @@ for root, dirnames, filenames in os.walk(sys.argv[1]): xml = format(xml, time_formats, "bb_lat") # print xml - file = open(path, "w") - file.write(xml) - file.close() + outfile = open(path, "w") + outfile.write(xml) + outfile.close()