Skip to content

Commit d6a32a9

Browse files
Daniel NunesInfernio
authored andcommitted
Fix outdated exception raising
1 parent 038f6ba commit d6a32a9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Mopy/bash/ScriptParser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ class ParserError(SyntaxError): pass
214214
gParser = None
215215
def error(msg):
216216
if gParser:
217-
raise ParserError, u'(Line %s, Column %s): %s' % (gParser.cLine, gParser.cCol, msg)
217+
raise ParserError(u'(Line %s, Column %s): %s' % (gParser.cLine, gParser.cCol, msg))
218218
else:
219-
raise ParserError, msg
219+
raise ParserError(msg)
220220

221221
# Parser ------------------------------------------
222222
# This is where the magic happens
@@ -752,7 +752,7 @@ def ExecuteRPN(self, rpn=None):
752752
error(_(u'Too many values left at the end of evaluation.'))
753753

754754
def error(self, msg):
755-
raise ParserError, u'(Line %s, Column %s): %s' % (self.cLine, self.cCol, msg)
755+
raise ParserError(u'(Line %s, Column %s): %s' % (self.cLine, self.cCol, msg))
756756

757757
#Functions for parsing a line into tokens
758758
def _grow(self, c):

0 commit comments

Comments
 (0)