Merge pull request #6854 from gdhameeja/Fix-6822

Check invalid operations for -k
This commit is contained in:
Ran Benita 2020-03-15 09:53:36 +02:00 committed by GitHub
commit c26bbdfaf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -112,5 +112,5 @@ def matchkeyword(colitem, keywordexpr):
)
try:
return eval(keywordexpr, {}, mapping)
except SyntaxError:
except Exception:
raise UsageError("Wrong expression passed to '-k': {}".format(keywordexpr))