mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	Make ConfigParser.Error inherit from Exception.
This commit is contained in:
		
							parent
							
								
									5255c791cc
								
							
						
					
					
						commit
						7c1e5adf27
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -96,11 +96,13 @@ | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
| # exception classes | # exception classes | ||||||
| class Error: | class Error(Exception): | ||||||
|     def __init__(self, msg=''): |     def __init__(self, msg=''): | ||||||
|         self._msg = msg |         self._msg = msg | ||||||
|  |         Exception.__init__(self, msg) | ||||||
|     def __repr__(self): |     def __repr__(self): | ||||||
|         return self._msg |         return self._msg | ||||||
|  |     __str__ = __repr__ | ||||||
| 
 | 
 | ||||||
| class NoSectionError(Error): | class NoSectionError(Error): | ||||||
|     def __init__(self, section): |     def __init__(self, section): | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Fred Drake
						Fred Drake