| Conditions | 3 |
| Total Lines | 9 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | """Mixin class for types that need a data directory""" |
||
| 15 | @property |
||
| 16 | def datadir(self) -> str: |
||
| 17 | if not os.path.exists(self._datadir_path): |
||
| 18 | try: |
||
| 19 | os.makedirs(self._datadir_path) |
||
| 20 | except FileExistsError: |
||
| 21 | # apparently the datadir was created by another thread! |
||
| 22 | pass |
||
| 23 | return self._datadir_path |
||
| 24 |