1
0
Fork 0

all exception are now catched

Dieser Commit ist enthalten in:
Sebastian Tobie 2023-04-21 00:17:54 +02:00
Ursprung 52b5a96926
Commit 69bb253369
1 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -26,6 +26,9 @@ if __name__ == "__main__":
except AttributeError: except AttributeError:
print("Broken module. skipping {}".format(modfile)) print("Broken module. skipping {}".format(modfile))
continue continue
except Exception as e:
print("Error in documentation of module {}: {}".format(modfile, e))
continue
moddata = modfile.read_text() moddata = modfile.read_text()
match = regex.search(moddata) match = regex.search(moddata)
if not match: if not match:
@ -34,4 +37,4 @@ if __name__ == "__main__":
newmod = "{pre}DOCUMENTATION = {quote}{doc}{quote}{post}".format(pre=moddata[:match.start()], quote=match.group("quote"), doc=moddoc, post=moddata[match.end():]) newmod = "{pre}DOCUMENTATION = {quote}{doc}{quote}{post}".format(pre=moddata[:match.start()], quote=match.group("quote"), doc=moddoc, post=moddata[match.end():])
modfile.write_text(newmod) modfile.write_text(newmod)
# code: python # code: python