From cb25f39136b3d48caa124e094ed7b5e53e3fe4a5 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Mon, 29 Apr 2019 14:24:21 +0300 Subject: [PATCH] abort on invalid command line game. --- pysollib/app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pysollib/app.py b/pysollib/app.py index 5c3bcc938b..f3b7513b05 100644 --- a/pysollib/app.py +++ b/pysollib/app.py @@ -25,6 +25,7 @@ # imports import os import re +import sys import traceback from pickle import UnpicklingError @@ -487,6 +488,7 @@ def mainproc(self): gameid = self.gdb.getGameByName(self.commandline.game) if gameid is None: print_err(_("can't find game: ") + self.commandline.game) + sys.exit(-1) else: self.nextgame.id, self.nextgame.random = gameid, None elif self.commandline.gameid is not None: