mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-11-04 09:02:12 +00:00 
			
		
		
		
	fw/exception: Add 'message' property to SerializerSyntaxError
				
					
				
			Allow for the fact that Exceptions do not have a message attribute in Python3 so mimic the functionality.
This commit is contained in:
		@@ -89,6 +89,11 @@ class SerializerSyntaxError(Exception):
 | 
			
		||||
    """
 | 
			
		||||
    Error loading a serialized structure from/to a file handle.
 | 
			
		||||
    """
 | 
			
		||||
    @property
 | 
			
		||||
    def message(self):
 | 
			
		||||
        if self.args:
 | 
			
		||||
            return self.args[0]
 | 
			
		||||
        return ''
 | 
			
		||||
 | 
			
		||||
    def __init__(self, message, line=None, column=None):
 | 
			
		||||
        super(SerializerSyntaxError, self).__init__(message)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user