| Conditions | 2 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2.1481 |
| Changes | 0 | ||
| 1 | 1 | import sys |
|
| 17 | 1 | def __init__(self, q=False, testing=False): |
|
| 18 | """ |
||
| 19 | Initializing the data printing process. |
||
| 20 | |||
| 21 | """ |
||
| 22 | 1 | super().__init__() |
|
| 23 | 1 | self.sender = 'Print' |
|
| 24 | 1 | self.alive = True |
|
| 25 | 1 | self.testing = testing |
|
| 26 | |||
| 27 | 1 | if q: |
|
| 28 | 1 | self.queue = q |
|
| 29 | else: |
||
| 30 | printE('no queue passed to consumer! Thread will exit now!', self.sender) |
||
| 31 | sys.stdout.flush() |
||
| 32 | self.alive = False |
||
| 33 | sys.exit() |
||
| 34 | |||
| 35 | 1 | printM('Starting.', self.sender) |
|
| 36 | |||
| 57 | self.alive = False |