| Conditions | 3 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | """Common functionality for backends.""" |
||
| 23 | def _get_datadir(self): |
||
| 24 | """return the path of the directory where this backend can store its |
||
| 25 | data files""" |
||
| 26 | if self._datadir is None: |
||
| 27 | self._datadir = os.path.join( |
||
| 28 | annif.cxapp.app.config['DATADIR'], |
||
| 29 | 'backends', |
||
| 30 | self.backend_id) |
||
| 31 | if not os.path.exists(self._datadir): |
||
| 32 | os.makedirs(self._datadir) |
||
| 33 | return self._datadir |
||
| 34 | |||
| 44 |