@@ -283,10 +283,10 @@ def _backjump(self, causes):
283
283
284
284
Each iteration of the loop will:
285
285
286
- 1. Identify Z. The incompatibility is not necessarily caused by the latest state.
286
+ 1. Identify Z. The incompatibility is not always caused by the latest state.
287
287
For example, given three requirements A, B and C, with dependencies
288
- A1, B1 and C1, where A1 and B1 are incompatible:
289
- the last state might be related to C, so we want to discard the previous state.
288
+ A1, B1 and C1, where A1 and B1 are incompatible: the last state
289
+ might be related to C, so we want to discard the previous state.
290
290
2. Discard Z.
291
291
3. Discard Y but remember its incompatibility information gathered
292
292
previously, and the failure we're dealing with right now.
@@ -310,9 +310,10 @@ def _backjump(self, causes):
310
310
# Retrieve the last candidate pin and known incompatibilities.
311
311
try :
312
312
broken_state = self ._states .pop ()
313
- except :
313
+ except IndexError :
314
314
raise Exception (
315
- "Exhausted all states during backjumping, impossible to find a fully-compatible dependency tree."
315
+ "Exhausted all states during backjumping, "
316
+ "impossible to find a fully-compatible dependency tree."
316
317
)
317
318
name , candidate = broken_state .mapping .popitem ()
318
319
current_dependencies = {
0 commit comments