Conditions | 2 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | 1 | from cleo.helpers import argument |
|
15 | def handle(self) -> int: |
||
16 | """ |
||
17 | 1 | Executes constants command when StratumCommand is activated. |
|
18 | """ |
||
19 | 1 | self._read_config_file() |
|
20 | 1 | ||
21 | factory = self._create_backend_factory() |
||
22 | 1 | worker = factory.create_constant_worker(self._config, self._io) |
|
23 | 1 | ||
24 | 1 | if not worker: |
|
25 | 1 | self._io.title('Constants') |
|
26 | self._io.error('Constants command is not implemented by the backend') |
||
27 | 1 | return -1 |
|
28 | |||
29 | return worker.execute() |
||
30 | |||
32 |