Skip to content

Commit b2cb3d9

Browse files
committed
Warn users when no abilities are loaded instead of asserting
1 parent dbb1396 commit b2cb3d9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pyttman/tools/pyttmancli/terraforming.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import shutil
44
import sys
55
import traceback
6+
import warnings
67
from datetime import datetime
78
from importlib import import_module
89
from pathlib import Path
@@ -277,6 +278,8 @@ def load_abilities(settings: Settings) -> set:
277278
ability_module = import_module(ability_module_name)
278279
ability_class = getattr(ability_module, ability_class_name)
279280
ability_objects_set.add(ability_class())
280-
assert len(ability_objects_set), "No Ability classes were provided the " \
281-
"ABILITIES list in settings.py"
281+
282+
if not len(ability_objects_set):
283+
warnings.warn("There are no ability classes loaded - "
284+
"your app will not have any replies.")
282285
return ability_objects_set

0 commit comments

Comments
 (0)