Code and GUI text cleanup (#926)

* Move int range checkers from options class to common file
* Improve error handling and reporting
* Make some minor improvements to init and test suite
* Fix 'trypewriter' to 'typewriter' typo
* Remove menu path description in dialog help text
* Improve the help text for entries in the Format menu
* Reword a couple of dialog messages
This commit is contained in:
Veronica Berglyd Olsen
2021-11-07 18:17:17 +01:00
committed by GitHub
parent e71121f738
commit e8bb130245
23 changed files with 257 additions and 250 deletions
+6 -6
View File
@@ -100,8 +100,8 @@ class NWDoc():
# Load the rest of the file
theText += inFile.read()
except Exception as e:
self._docError = str(e)
except Exception as exc:
self._docError = str(exc)
return None
else:
@@ -149,8 +149,8 @@ class NWDoc():
with open(docTemp, mode="w", encoding="utf-8") as outFile:
outFile.write(docMeta)
outFile.write(docText)
except Exception as e:
self._docError = str(e)
except Exception as exc:
self._docError = str(exc)
return False
# If we're here, the file was successfully saved, so we can
@@ -184,8 +184,8 @@ class NWDoc():
try:
os.unlink(chkFile)
logger.debug("Deleted: %s", chkFile)
except Exception as e:
self._docError = str(e)
except Exception as exc:
self._docError = str(exc)
return False
return True