cannot override an existing dictionary in upgrade

This commit is contained in:
Emmanuel Garette 2021-04-16 09:20:54 +02:00
parent 12111397e6
commit 0e55679e8b

View file

@ -76,6 +76,8 @@ class RougailUpgrade:
for filename in filenames:
xmlsrc = join(srcfolder, filename)
xmldst = join(dstfolder, filename)
if isfile(xmldst):
raise Exception(f'cannot update "{xmlsrc}" destination file "{xmldst}" already exists')
try:
parser = XMLParser(remove_blank_text=True)
document = parse(xmlsrc, parser)