typo
This commit is contained in:
@ -1,3 +1,4 @@
|
|||||||
|
from ast import mod
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import yaml
|
import yaml
|
||||||
@ -195,7 +196,7 @@ def modifyFiles(config, destinationDirectory):
|
|||||||
else:
|
else:
|
||||||
print(f" Text already replaced: {old_text} -> {new_text}")
|
print(f" Text already replaced: {old_text} -> {new_text}")
|
||||||
errorList['modWarnings'] += 1
|
errorList['modWarnings'] += 1
|
||||||
|
|
||||||
|
|
||||||
# Write modified contents
|
# Write modified contents
|
||||||
with open(filePath, 'w', encoding='utf-8') as f:
|
with open(filePath, 'w', encoding='utf-8') as f:
|
||||||
@ -218,7 +219,7 @@ def modifyFiles(config, destinationDirectory):
|
|||||||
errorList["modifications"] += 1
|
errorList["modifications"] += 1
|
||||||
continue
|
continue
|
||||||
|
|
||||||
print(f"\nFile modification process completed with {errorList['modifications']} errors.\n")
|
print(f"\nFile modification process completed with {errorList['modifications']} errors and {errorList['modWarnings']} warnings.\n")
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@ -252,7 +253,7 @@ def main():
|
|||||||
print(f"{errorList['copies']} copy errors.")
|
print(f"{errorList['copies']} copy errors.")
|
||||||
print(f"{errorList['modifications']} modification errors.")
|
print(f"{errorList['modifications']} modification errors.")
|
||||||
elif errorList["warnings"] > 0:
|
elif errorList["warnings"] > 0:
|
||||||
print(f"All operations in {destinationDirectory} from {configPath} completed successfully! But there were {errorList['warnings']} warnings. Mybe you should check them.")
|
print(f"All operations in {destinationDirectory} from {configPath} completed successfully! But there were {errorList['modWarnings'] + errorList['copyWarnings']} warnings. Mybe you should check them.")
|
||||||
else:
|
else:
|
||||||
print(f"All operations in {destinationDirectory} from {configPath} completed successfully!")
|
print(f"All operations in {destinationDirectory} from {configPath} completed successfully!")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user