Replace 'sys.exit()' and 'exit()' instructions with 'SystemExit()' equivalents

- `SystemExit` doesn't require importing the `sys` module
- `exit()` depends on the `site` module (for this reason its usage is discouraged in production code)

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
This commit is contained in:
JoeLametta
2020-05-30 09:38:42 +00:00
parent 8802c5482e
commit fa7c50d3a6
4 changed files with 6 additions and 10 deletions

View File

@@ -18,8 +18,6 @@
# You should have received a copy of the GNU General Public License
# along with whipper. If not, see <http://www.gnu.org/licenses/>.
import sys
from whipper.command.basecommand import BaseCommand
from whipper.common import accurip, config, program
from whipper.extern.task import task
@@ -63,7 +61,7 @@ Verifies the image from the given .cue files against the AccurateRip database.
print('AccurateRip entry not found')
accurip.print_report(prog.result)
if not verified:
sys.exit(1)
raise SystemExit(1)
class Image(BaseCommand):