X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/df15627716cc16aacbc577c4328fc186d7e7637d..2492231f7381ce33f2164322f799c84b2d7cceef:/lib/errors.py diff --git a/lib/errors.py b/lib/errors.py index 06bd9e5..9de3b6d 100644 --- a/lib/errors.py +++ b/lib/errors.py @@ -298,7 +298,7 @@ class InotifyError(GenericError): class QuitGanetiException(Exception): - """Signal that Ganeti that it must quit. + """Signal Ganeti that it must quit. This is not necessarily an error (and thus not a subclass of GenericError), but it's an exceptional circumstance and it is thus @@ -391,6 +391,24 @@ class LuxiError(GenericError): """ +class QueryFilterParseError(ParseError): + """Error while parsing query filter. + + """ + def GetDetails(self): + """Returns a list of strings with details about the error. + + """ + try: + (_, inner) = self.args + except IndexError: + return None + + return [str(inner.line), + (" " * (inner.column - 1)) + "^", + str(inner)] + + # errors should be added above