(filename)
| 69 | """ |
| 70 | @staticmethod |
| 71 | def _validate_py_syntax(filename): |
| 72 | with open(filename) as f: |
| 73 | content = f.read() |
| 74 | try: |
| 75 | ast.parse(content) |
| 76 | except SyntaxError: |
| 77 | raise SyntaxError('There are syntax errors in config ' |
| 78 | f'file {filename}') |
| 79 | |
| 80 | @staticmethod |
| 81 | def _file2dict(filename): |