<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<font size="4">I would like to terminate a Python script
gracefully. Both quit() and exit() not only abort the script but
end the entire QGIS app. For example, if a file I want to read
doesn't exist, the following four lines of code terminate QGIS:<br>
<br>
filePath = Path(fName)<br>
if not filePath.is_file():<br>
print ('Unable to find file ', fName)<br>
exit() <br>
<br>
Substituting quit() for exit() doesn't help. I could omit both,
and put all of the remaining code under an "else" but that seems
rather clunky.<br>
Any suggestions would be welcome.<br>
<br>
<br>
</font>
</body>
</html>