public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/console/
Date: Tue,  1 Apr 2014 16:38:48 +0000 (UTC)	[thread overview]
Message-ID: <1396280294.f9fa3b5544e0009297a771c6efd7e7d24cce8fbc.dywi@gentoo> (raw)

commit:     f9fa3b5544e0009297a771c6efd7e7d24cce8fbc
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Mon Mar 31 15:38:14 2014 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Mon Mar 31 15:38:14 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=f9fa3b55

console interpreter: do not fail if var is not set

---
 roverlay/console/interpreter.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/roverlay/console/interpreter.py b/roverlay/console/interpreter.py
index e31096f..107a14a 100644
--- a/roverlay/console/interpreter.py
+++ b/roverlay/console/interpreter.py
@@ -281,7 +281,10 @@ class ConsoleInterpreter ( cmd.Cmd ):
       else:
          l = line
 
-      return self._str_formatter.vformat ( l, (), self._locals )
+      try:
+         return self._str_formatter.vformat ( l, (), self._locals )
+      except KeyError as kerr:
+         raise ConsoleUsageException ( "{!s} is not set.".format ( kerr ) )
    # --- end of format_locals (...) ---
 
    def get_fspath ( self, line ):


             reply	other threads:[~2014-04-01 16:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-01 16:38 André Erdmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-08-23 19:03 [gentoo-commits] proj/R_overlay:master commit in: roverlay/console/ André Erdmann
2013-08-23 13:51 André Erdmann
2013-08-06 10:58 André Erdmann
2013-07-24 16:52 André Erdmann
2013-07-24 16:52 André Erdmann
2013-07-24 16:52 André Erdmann
2013-07-23  7:51 André Erdmann
2013-07-23  7:51 André Erdmann
2013-07-23  7:51 André Erdmann
2013-07-19 18:00 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-23  7:51 ` [gentoo-commits] proj/R_overlay:master " André Erdmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1396280294.f9fa3b5544e0009297a771c6efd7e7d24cce8fbc.dywi@gentoo \
    --to=dywi@mailerd.de \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox