mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 11:49:12 +00:00 
			
		
		
		
	Fix plistlib to work with dict views.
This commit is contained in:
		
							parent
							
								
									75d26ccd7a
								
							
						
					
					
						commit
						b38e2bcfd4
					
				
					 2 changed files with 2 additions and 3 deletions
				
			
		
							
								
								
									
										2
									
								
								BROKEN
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								BROKEN
									
										
									
									
									
								
							| 
						 | 
					@ -1,3 +1,3 @@
 | 
				
			||||||
    test_bsddb test_bsddb3 test_compile test_dumbdbm
 | 
					    test_bsddb test_bsddb3 test_compile test_dumbdbm
 | 
				
			||||||
    test_importhooks test_iter test_iterlen test_minidom test_mutants
 | 
					    test_importhooks test_iter test_iterlen test_minidom test_mutants
 | 
				
			||||||
    test_os test_plistlib
 | 
					    test_os
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -268,8 +268,7 @@ class PlistWriter(DumbXMLWriter):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def writeDict(self, d):
 | 
					    def writeDict(self, d):
 | 
				
			||||||
        self.beginElement("dict")
 | 
					        self.beginElement("dict")
 | 
				
			||||||
        items = d.items()
 | 
					        items = sorted(d.items())
 | 
				
			||||||
        items.sort()
 | 
					 | 
				
			||||||
        for key, value in items:
 | 
					        for key, value in items:
 | 
				
			||||||
            if not isinstance(key, (str, unicode)):
 | 
					            if not isinstance(key, (str, unicode)):
 | 
				
			||||||
                raise TypeError("keys must be strings")
 | 
					                raise TypeError("keys must be strings")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue