feeds: remove useless if(len) before loop
This commit is contained in:
		@@ -734,9 +734,8 @@ class FeedXML(Feed, ParserXML):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        stylesheets = [x for x in self.root_siblings() if isinstance(x, etree.PIBase) and x.target == 'xml-stylesheet']
 | 
					        stylesheets = [x for x in self.root_siblings() if isinstance(x, etree.PIBase) and x.target == 'xml-stylesheet']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if len(stylesheets):
 | 
					 | 
				
			||||||
            # remove all stylesheets present (be that ours or others')
 | 
					 | 
				
			||||||
        for stylesheet in stylesheets:
 | 
					        for stylesheet in stylesheets:
 | 
				
			||||||
 | 
					            # remove all stylesheets present (be that ours or others')
 | 
				
			||||||
            self.root.append(stylesheet) # needed as we can't delete root siblings https://stackoverflow.com/a/60232366
 | 
					            self.root.append(stylesheet) # needed as we can't delete root siblings https://stackoverflow.com/a/60232366
 | 
				
			||||||
            self.root.remove(stylesheet)
 | 
					            self.root.remove(stylesheet)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user