mirror of
				https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
				synced 2025-10-31 00:24:06 +00:00 
			
		
		
		
	solver: Invert an if-statement to reduce max indentation level
Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
		
							parent
							
								
									68407c53c0
								
							
						
					
					
						commit
						b61e1086bd
					
				| @ -267,18 +267,20 @@ class InstallabilitySolver(object): | ||||
|             scc_id = com[0] | ||||
|             scc[scc_id] = com | ||||
|             merged[scc_id] = scc_id | ||||
|             if len(com) > 1: | ||||
|                 so_before = order[scc_id]['before'] | ||||
|                 so_after = order[scc_id]['after'] | ||||
|                 for n in com: | ||||
|                     if n == scc_id: | ||||
|                         continue | ||||
|                     so_before.update(order[n]['before']) | ||||
|                     so_after.update(order[n]['after']) | ||||
|                     merged[n] = scc_id | ||||
|                     del order[n] | ||||
|                 if debug_solver:  # pragma: no cover | ||||
|                     self.logger.debug("SCC: %s -- %s", scc_id, str(sorted(com))) | ||||
|             if len(com) < 2: | ||||
|                 # Trivial case | ||||
|                 continue | ||||
|             so_before = order[scc_id]['before'] | ||||
|             so_after = order[scc_id]['after'] | ||||
|             for n in com: | ||||
|                 if n == scc_id: | ||||
|                     continue | ||||
|                 so_before.update(order[n]['before']) | ||||
|                 so_after.update(order[n]['after']) | ||||
|                 merged[n] = scc_id | ||||
|                 del order[n] | ||||
|             if debug_solver:  # pragma: no cover | ||||
|                 self.logger.debug("SCC: %s -- %s", scc_id, str(sorted(com))) | ||||
| 
 | ||||
|         for com in comps: | ||||
|             node = com[0] | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user