mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	* aifc.py: don't die on invalid MARK chunk
* calendar.py: remove stuff now built in time; some cleanup and generalization in the calendar printing * cmd.py: use __init__. * tzparse.py: This module is no longer necessary -- use builtin time instead!
This commit is contained in:
		
							parent
							
								
									52fc1f607e
								
							
						
					
					
						commit
						9b3bc71598
					
				
					 4 changed files with 104 additions and 133 deletions
				
			
		
							
								
								
									
										19
									
								
								Lib/aifc.py
									
										
									
									
									
								
							
							
						
						
									
										19
									
								
								Lib/aifc.py
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -563,11 +563,20 @@ class Aifc_read:
 | 
			
		|||
 | 
			
		||||
	def _readmark(self, chunk):
 | 
			
		||||
		nmarkers = _read_short(chunk)
 | 
			
		||||
		for i in range(nmarkers):
 | 
			
		||||
			id = _read_short(chunk)
 | 
			
		||||
			pos = _read_long(chunk)
 | 
			
		||||
			name = _read_string(chunk)
 | 
			
		||||
			self._markers.append((id, pos, name))
 | 
			
		||||
		# Some files appear to contain invalid counts.
 | 
			
		||||
		# Cope with this by testing for EOF.
 | 
			
		||||
		try:
 | 
			
		||||
			for i in range(nmarkers):
 | 
			
		||||
				id = _read_short(chunk)
 | 
			
		||||
				pos = _read_long(chunk)
 | 
			
		||||
				name = _read_string(chunk)
 | 
			
		||||
				self._markers.append((id, pos, name))
 | 
			
		||||
		except EOFError:
 | 
			
		||||
			print 'Warning: MARK chunk contains only',
 | 
			
		||||
			print len(self._markers),
 | 
			
		||||
			if len(self._markers) == 1: print 'marker',
 | 
			
		||||
			else: print 'markers',
 | 
			
		||||
			print 'instead of', nmarkers
 | 
			
		||||
 | 
			
		||||
class Aifc_write:
 | 
			
		||||
	# Variables used in this class:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue