Fix psm file was overwritten
This commit is contained in:
+1
-1
@@ -172,7 +172,7 @@ def write_psm(name, items: list[str], filename: Path = Path("Connector.psm1")) -
|
|||||||
output += get_code.replace("!NAME!", name)
|
output += get_code.replace("!NAME!", name)
|
||||||
output += convert_from.replace("!NAME!", name).replace("!MAPS!", define_maps(items))
|
output += convert_from.replace("!NAME!", name).replace("!MAPS!", define_maps(items))
|
||||||
output += class_definition.replace("!NAME!", name).replace("!VARIABLES!", define_variables(items)).replace("!STRINGS!", define_strings(items))
|
output += class_definition.replace("!NAME!", name).replace("!VARIABLES!", define_variables(items)).replace("!STRINGS!", define_strings(items))
|
||||||
with open(filename, "w") as f:
|
with open(filename, "a") as f:
|
||||||
f.write(output)
|
f.write(output)
|
||||||
print(output)
|
print(output)
|
||||||
pass
|
pass
|
||||||
Reference in New Issue
Block a user