approve hit msg when python version is unsupported

currently, when the python version used is not supported, it will raise "Python version None is currently not supported."
This commit is contained in:
WinChua
2020-05-17 17:47:52 +08:00
committed by Dave Halter
parent 1b4c75608a
commit caadf3bf4c

View File

@@ -252,7 +252,7 @@ def load_grammar(**kwargs):
grammar = PythonGrammar(version_info, bnf_text)
return _loaded_grammars.setdefault(path, grammar)
except FileNotFoundError:
message = "Python version %s is currently not supported." % version
message = "Python version %s.%s is currently not supported." % (version_info.major, version_info.minor)
raise NotImplementedError(message)
else:
raise NotImplementedError("No support for language %s." % language)