Modernize exception handling, and improves Python 3.x compatibility
This commit is contained in:
@@ -20,7 +20,7 @@ class SourceTransformationManager(models.Manager):
|
||||
'arguments': literal_eval(transformation['arguments'].strip())
|
||||
}
|
||||
)
|
||||
except (ValueError, SyntaxError), e:
|
||||
warnings.append(e)
|
||||
except (ValueError, SyntaxError) as exception:
|
||||
warnings.append(exception)
|
||||
|
||||
return transformations, warnings
|
||||
|
||||
Reference in New Issue
Block a user