| Conditions | 3 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | # -*- coding: utf-8 -*- |
||
| 27 | def translate(self, message): |
||
| 28 | try: |
||
| 29 | body = json.loads(message['Body']) |
||
| 30 | message = body['Message'] |
||
| 31 | except (KeyError, TypeError): |
||
| 32 | logger.error('Missing Body or Message key in SQS message. It really came from SNS ?') |
||
| 33 | return {'content': None} |
||
| 34 | |||
| 35 | try: |
||
| 36 | return {'content': json.loads(message)} |
||
| 37 | except (json.decoder.JSONDecodeError, TypeError) as exc: |
||
|
1 ignored issue
–
show
|
|||
| 38 | logger.exception(exc) |
||
| 39 | return {'content': None} |
||
| 40 |
This check looks for invalid names for a range of different identifiers.
You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.
If your project includes a Pylint configuration file, the settings contained in that file take precedence.
To find out more about Pylint, please refer to their site.