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