Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7bcb3ce

Browse files
committed
Patch for an Issue #1099
1 parent 0c4d63f commit 7bcb3ce

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

lib/core/common.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3278,7 +3278,10 @@ def __init__(self):
32783278
if opt.startswith(name):
32793279
options[opt] = option
32803280

3281-
if name in options:
3281+
if not options:
3282+
warnMsg = "mnemonic '%s' can't be resolved" % name
3283+
logger.warn(warnMsg)
3284+
elif name in options:
32823285
found = name
32833286
debugMsg = "mnemonic '%s' resolved to %s). " % (name, found)
32843287
logger.debug(debugMsg)
@@ -3288,7 +3291,8 @@ def __init__(self):
32883291
warnMsg += "Resolved to shortest of those ('%s')" % found
32893292
logger.warn(warnMsg)
32903293

3291-
found = options[found]
3294+
if found:
3295+
found = options[found]
32923296
else:
32933297
found = pointer.current[0]
32943298
debugMsg = "mnemonic '%s' resolved to %s). " % (name, found)

0 commit comments

Comments
 (0)