[Diff] Added error message when KIBOT_LAST doesn't point to a hash

This commit is contained in:
Salvador E. Tropea 2022-09-02 08:14:55 -03:00
parent d834ba5075
commit de4d6c0714
1 changed files with 2 additions and 0 deletions

View File

@ -192,6 +192,8 @@ class DiffOptions(BaseOptions):
num = str(num)
# Return its hash
res = self.run_git(['log', '--pretty=format:%H', '--skip='+num, '-n', '1', '--', self.file])
if not res:
raise KiPlotConfigurationError("The `{}` doesn't resolve to a valid hash".format(ori))
logger.debug('- '+res)
return res