(self)
| 71 | return os.path.join(c['homepath'], self.name + 's') |
| 72 | |
| 73 | def _config_filename(self): |
| 74 | path = self._get_path() |
| 75 | filename = os.path.join(path, self.data_file) |
| 76 | if not os.path.exists(filename): |
| 77 | if not os.path.exists(path): |
| 78 | os.makedirs(path) |
| 79 | data = dict(counter=0) |
| 80 | data[self.name + 's'] = [] |
| 81 | with open(filename, 'w') as fp: |
| 82 | json.dump(data, fp) |
| 83 | return filename |
| 84 | |
| 85 | def _get_config(self): |
| 86 | with open(self._config_filename(), 'r') as fp: |
no test coverage detected