summaryrefslogtreecommitdiffstats
path: root/Tools/bgen
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/bgen')
-rw-r--r--Tools/bgen/bgen/bgenBuffer.py6
-rw-r--r--Tools/bgen/bgen/bgenGenerator.py2
-rw-r--r--Tools/bgen/bgen/bgenHeapBuffer.py2
-rw-r--r--Tools/bgen/bgen/bgenOutput.py2
-rw-r--r--Tools/bgen/bgen/bgenType.py4
-rw-r--r--Tools/bgen/bgen/scantools.py6
6 files changed, 11 insertions, 11 deletions
diff --git a/Tools/bgen/bgen/bgenBuffer.py b/Tools/bgen/bgen/bgenBuffer.py
index 94ab950..98bbfe2 100644
--- a/Tools/bgen/bgen/bgenBuffer.py
+++ b/Tools/bgen/bgen/bgenBuffer.py
@@ -40,7 +40,7 @@ class FixedInputOutputBufferType(InputOnlyType):
def getArgDeclarations(self, name, reference=False, constmode=False, outmode=False):
if reference:
- raise RuntimeError, "Cannot pass buffer types by reference"
+ raise RuntimeError("Cannot pass buffer types by reference")
return (self.getBufferDeclarations(name, constmode, outmode) +
self.getSizeDeclarations(name, outmode))
@@ -57,7 +57,7 @@ class FixedInputOutputBufferType(InputOnlyType):
def getOutputBufferDeclarations(self, name, constmode=False, outmode=False):
if constmode:
- raise RuntimeError, "Cannot use const output buffer"
+ raise RuntimeError("Cannot use const output buffer")
if outmode:
out = "*"
else:
@@ -216,7 +216,7 @@ class StructInputOutputBufferType(FixedInputOutputBufferType):
def getOutputBufferDeclarations(self, name, constmode=False, outmode=False):
if constmode:
- raise RuntimeError, "Cannot use const output buffer"
+ raise RuntimeError("Cannot use const output buffer")
if outmode:
out = "*"
else:
diff --git a/Tools/bgen/bgen/bgenGenerator.py b/Tools/bgen/bgen/bgenGenerator.py
index ae5c06b..e364d01 100644
--- a/Tools/bgen/bgen/bgenGenerator.py
+++ b/Tools/bgen/bgen/bgenGenerator.py
@@ -280,7 +280,7 @@ class MethodGenerator(FunctionGenerator):
a0, args = args[0], args[1:]
t0, n0, m0 = a0
if m0 != InMode:
- raise ValueError, "method's 'self' must be 'InMode'"
+ raise ValueError("method's 'self' must be 'InMode'")
self.itself = Variable(t0, "_self->ob_itself", SelfMode)
self.argumentList.append(self.itself)
FunctionGenerator.parseArgumentList(self, args)
diff --git a/Tools/bgen/bgen/bgenHeapBuffer.py b/Tools/bgen/bgen/bgenHeapBuffer.py
index 930bb7e..fda8d30 100644
--- a/Tools/bgen/bgen/bgenHeapBuffer.py
+++ b/Tools/bgen/bgen/bgenHeapBuffer.py
@@ -18,7 +18,7 @@ class HeapInputOutputBufferType(FixedInputOutputBufferType):
def getOutputBufferDeclarations(self, name, constmode=False, outmode=False):
if constmode:
- raise RuntimeError, "Cannot use const output buffer"
+ raise RuntimeError("Cannot use const output buffer")
if outmode:
out = "*"
else:
diff --git a/Tools/bgen/bgen/bgenOutput.py b/Tools/bgen/bgen/bgenOutput.py
index 53d4f55..bceac59 100644
--- a/Tools/bgen/bgen/bgenOutput.py
+++ b/Tools/bgen/bgen/bgenOutput.py
@@ -83,7 +83,7 @@ def IndentLevel(by = 1):
"""
global _Level
if _Level+by < 0:
- raise Error, "indentation underflow (internal error)"
+ raise Error("indentation underflow (internal error)")
_Level = _Level + by
def DedentLevel(by = 1):
diff --git a/Tools/bgen/bgen/bgenType.py b/Tools/bgen/bgen/bgenType.py
index c988700..dcb0f08 100644
--- a/Tools/bgen/bgen/bgenType.py
+++ b/Tools/bgen/bgen/bgenType.py
@@ -163,7 +163,7 @@ class InputOnlyMixIn:
"Mix-in class to boobytrap passOutput"
def passOutput(self, name):
- raise RuntimeError, "Type '%s' can only be used for input parameters" % self.typeName
+ raise RuntimeError("Type '%s' can only be used for input parameters" % self.typeName)
class InputOnlyType(InputOnlyMixIn, Type):
@@ -174,7 +174,7 @@ class OutputOnlyMixIn:
"Mix-in class to boobytrap passInput"
def passInput(self, name):
- raise RuntimeError, "Type '%s' can only be used for output parameters" % self.typeName
+ raise RuntimeError("Type '%s' can only be used for output parameters" % self.typeName)
class OutputOnlyType(OutputOnlyMixIn, Type):
diff --git a/Tools/bgen/bgen/scantools.py b/Tools/bgen/bgen/scantools.py
index 3d973d0..d03bc93 100644
--- a/Tools/bgen/bgen/scantools.py
+++ b/Tools/bgen/bgen/scantools.py
@@ -420,7 +420,7 @@ if missing: raise "Missing Types"
try:
file = open(filename, 'w')
except IOError as arg:
- raise IOError, (filename, arg)
+ raise IOError(filename, arg)
self.setfiletype(filename)
return file
@@ -461,11 +461,11 @@ if missing: raise "Missing Types"
try:
return open(filename, 'rU')
except IOError as arg:
- raise IOError, (arg, filename)
+ raise IOError(arg, filename)
def getline(self):
if not self.scanfile:
- raise Error, "input file not set"
+ raise Error("input file not set")
self.line = self.scanfile.readline()
if not self.line:
if self._nextinput():