[PATCH 3/3] lower empty backends/chain priority to -10. Ref #372
Gbp-Pq: Topic lp1864204 Gbp-Pq: Name 0003-lower-empty-backends-chain-priority-to-10.-Ref-372.patch
This commit is contained in:
parent
ed1677dc05
commit
7ec55e4653
|
@ -23,9 +23,11 @@ class ChainerBackend(backend.KeyringBackend):
|
|||
@classmethod
|
||||
def priority(cls):
|
||||
"""
|
||||
High-priority if there are backends to chain, otherwise 0.
|
||||
If there are backends to chain, high priority
|
||||
Otherwise very low priority since our operation when empty
|
||||
is the same as null.
|
||||
"""
|
||||
return 10 * (len(cls.backends) > 1)
|
||||
return 10 if len(cls.backends) > 1 else -10
|
||||
|
||||
@properties.ClassProperty
|
||||
@classmethod
|
||||
|
|
Loading…
Reference in New Issue