mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	ConfigParser.read(): Don't mask IOError exceptions.
This commit is contained in:
		
							parent
							
								
									ef93095adb
								
							
						
					
					
						commit
						2438a485c8
					
				
					 1 changed files with 3 additions and 5 deletions
				
			
		|  | @ -170,11 +170,9 @@ def read(self, filenames): | ||||||
|         if type(filenames) is type(''): |         if type(filenames) is type(''): | ||||||
|             filenames = [filenames] |             filenames = [filenames] | ||||||
|         for file in filenames: |         for file in filenames: | ||||||
|             try: |             fp = open(file) | ||||||
|                 fp = open(file, 'r') |             self.__read(fp) | ||||||
|                 self.__read(fp) |             fp.close() | ||||||
|             except IOError: |  | ||||||
|                 pass |  | ||||||
| 
 | 
 | ||||||
|     def get(self, section, option, raw=0, vars=None): |     def get(self, section, option, raw=0, vars=None): | ||||||
|         """Get an option value for a given section. |         """Get an option value for a given section. | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Fred Drake
						Fred Drake