We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d7068a commit 98a190fCopy full SHA for 98a190f
demosys/core/management/commands/runeffect.py
@@ -2,20 +2,15 @@
2
Run a specific effect
3
"""
4
import demosys
5
+from demosys.core.management.base import CreateCommand
6
-HELP = "Runs an effect"
7
8
+class Command(CreateCommand):
9
+ help = "Runs an effect"
10
-def print_usage():
- print("Usage:")
11
- print(" runeffect <effectname>")
+ def add_arguments(self, parser):
12
+ parser.add_argument("name", help="Name of the effect")
13
-
14
-def run(args):
15
- effect_name = args[0] if args else None
16
- if effect_name is None:
17
- print_usage()
18
- return
19
20
- demosys.setup()
21
- demosys.run(runeffect=effect_name)
+ def handle(self, *args, **options):
+ demosys.setup()
+ demosys.run(runeffect=options['name'])
0 commit comments