@@ -156,7 +156,7 @@ def __init__(self, value):
156
156
if value >= len (ErrorKind ._kinds ):
157
157
ErrorKind ._kinds += [None ] * (value - len (ErrorKind ._kinds ) + 1 )
158
158
if ErrorKind ._kinds [value ] is not None :
159
- raise ValueError , 'ErrorKind already loaded'
159
+ raise ValueError ( 'ErrorKind already loaded' )
160
160
self .value = value
161
161
ErrorKind ._kinds [value ] = self
162
162
ErrorKind ._name_map = None
@@ -177,7 +177,7 @@ def name(self):
177
177
@staticmethod
178
178
def from_id (id ):
179
179
if id >= len (ErrorKind ._kinds ) or ErrorKind ._kinds [id ] is None :
180
- raise ValueError , 'Unknown type kind %d' % id
180
+ raise ValueError ( 'Unknown type kind {}' . format ( id ))
181
181
return ErrorKind ._kinds [id ]
182
182
183
183
def __repr__ (self ):
@@ -239,7 +239,7 @@ def __init__(self, value):
239
239
if value >= len (VariantType ._kinds ):
240
240
VariantType ._kinds += [None ] * (value - len (VariantType ._kinds ) + 1 )
241
241
if VariantType ._kinds [value ] is not None :
242
- raise ValueError , 'VariantType already loaded'
242
+ raise ValueError ( 'VariantType already loaded' )
243
243
self .value = value
244
244
VariantType ._kinds [value ] = self
245
245
VariantType ._name_map = None
@@ -260,7 +260,7 @@ def name(self):
260
260
@staticmethod
261
261
def from_id (id ):
262
262
if id >= len (VariantType ._kinds ) or VariantType ._kinds [id ] is None :
263
- raise ValueError , 'Unknown type kind %d' % id
263
+ raise ValueError ( 'Unknown type kind {}' . format ( id ))
264
264
return VariantType ._kinds [id ]
265
265
266
266
def __repr__ (self ):
0 commit comments