BaseException.message is deprecated since 2.6. Fixes #5465
This commit is contained in:
		
							parent
							
								
									684f45b148
								
							
						
					
					
						commit
						a0fea76ff2
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -20,13 +20,15 @@ class BaseError(Exception):
 | 
			
		|||
    """
 | 
			
		||||
 | 
			
		||||
    def __init__(self, message, command=None, name=None):
 | 
			
		||||
        self.message = message
 | 
			
		||||
 | 
			
		||||
        self.command = command
 | 
			
		||||
        self.name = name
 | 
			
		||||
 | 
			
		||||
        if command and not name:
 | 
			
		||||
            self.name = command.first_name
 | 
			
		||||
 | 
			
		||||
        super(BaseError, self).__init__(message)
 | 
			
		||||
        super(BaseError, self).__init__()
 | 
			
		||||
 | 
			
		||||
class DefinitionError(BaseError):
 | 
			
		||||
    """
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue