| Conditions | 3 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | # -*- coding: utf-8 -*- |
||
| 7 | @memoize |
||
| 8 | def get_yaml(): |
||
| 9 | """Tries to import the YAML library.""" |
||
| 10 | try: |
||
| 11 | import ruamel_yaml as yaml |
||
| 12 | except ImportError: # pragma: no cover |
||
| 13 | try: # pragma: no cover |
||
| 14 | import ruamel.yaml as yaml # pragma: no cover |
||
| 15 | except ImportError: # pragma: no cover |
||
| 16 | raise ImportError("No yaml library available.\n" # pragma: no cover |
||
| 17 | "To proceed, conda install " # pragma: no cover |
||
| 18 | "ruamel_yaml") # pragma: no cover |
||
| 19 | return yaml |
||
| 20 | |||
| 34 |