Try except.. everything.

This commit is contained in:
Casper V. Kristensen 2019-04-06 01:31:45 +02:00
parent b3b3303213
commit 55df1c20ee
Signed by: caspervk
GPG key ID: 289CA03790535054

View file

@ -21,7 +21,11 @@ def probabilities():
probs = []
for name, (weight, strategy) in strategies.items():
try:
prob = strategy(phone_data)
except Exception as e:
print(f"Strategy {name} failed: {e}")
continue
probs.append({
"name": name,
"doc": inspect.getdoc(strategy),