Georg Brandl committed 6a48b74

RobotFramework lexer: fix two instances of "return ValueError" instead of "raise ValueError".

  • Participants
  • Parent commits 44095e5

Comments (0)

Files changed (1)


     def _find_variable(self, string):
         max_end_index = string.rfind('}')
         if max_end_index == -1:
-            return ValueError('No variable end found')
+            raise ValueError('No variable end found')
         if self._is_escaped(string, max_end_index):
             return self._find_variable(string[:max_end_index])
         start_index = self._find_start_index(string, 1, max_end_index)
         if start_index == -1:
-            return ValueError('No variable start found')
+            raise ValueError('No variable start found')
         return start_index, max_end_index
     def _find_start_index(self, string, start, end):