From 7bcb3ce599201373fa1fe5e3de0bc5c8d51330b4 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 8 Jan 2015 09:22:47 +0100 Subject: [PATCH] Patch for an Issue #1099 --- lib/core/common.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index b1e48e919..972f09334 100755 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -3278,7 +3278,10 @@ def expandMnemonics(mnemonics, parser, args): if opt.startswith(name): options[opt] = option - if name in options: + if not options: + warnMsg = "mnemonic '%s' can't be resolved" % name + logger.warn(warnMsg) + elif name in options: found = name debugMsg = "mnemonic '%s' resolved to %s). " % (name, found) logger.debug(debugMsg) @@ -3288,7 +3291,8 @@ def expandMnemonics(mnemonics, parser, args): warnMsg += "Resolved to shortest of those ('%s')" % found logger.warn(warnMsg) - found = options[found] + if found: + found = options[found] else: found = pointer.current[0] debugMsg = "mnemonic '%s' resolved to %s). " % (name, found)