From c9d201c41856daf5e58e092954cc3353662891fa Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Tue, 21 Feb 2012 13:49:12 +0100 Subject: [PATCH] CLI: Handle ValueError when parsing input line --- bin/gpo | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/gpo b/bin/gpo index 25fa2d94..7381dfc5 100755 --- a/bin/gpo +++ b/bin/gpo @@ -627,7 +627,14 @@ class gPodderCli(object): break try: - self._parse(shlex.split(line)) + args = shlex.split(line) + except ValueError, value_error: + self._error(_('Syntax error: %(error)s') % + {'error': value_error}) + continue + + try: + self._parse(args) except KeyboardInterrupt: self._error('Keyboard interrupt.') except EOFError: -- 2.11.4.GIT