Conditions | 5 |
Total Lines | 21 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 5.0592 |
Changes | 0 |
1 | 1 | import sys |
|
37 | 1 | def run(self): |
|
38 | """ |
||
39 | Reads data from the queue and print to stdout. |
||
40 | """ |
||
41 | 1 | while True: |
|
42 | 1 | d = self.queue.get() |
|
43 | 1 | self.queue.task_done() |
|
44 | 1 | if 'TERM' in str(d): |
|
45 | 1 | self.alive = False |
|
46 | 1 | printM('Exiting.', self.sender) |
|
47 | 1 | sys.exit() |
|
48 | 1 | elif 'ALARM' in str(d): |
|
49 | 1 | pass |
|
50 | else: |
||
51 | 1 | if not self.testing: |
|
52 | print(str(d)) |
||
53 | else: |
||
54 | 1 | TEST['c_print'][1] = True |
|
55 | 1 | sys.stdout.flush() |
|
56 | |||
57 | self.alive = False |