| 138 | return True |
| 139 | |
| 140 | def save_state(self, destination): |
| 141 | destination = os.path.join(destination, self.identity) |
| 142 | if not os.path.isdir(destination): |
| 143 | os.makedirs(destination) |
| 144 | # Write version details blob as latest |
| 145 | vsc.Utility.write_json(os.path.join( |
| 146 | destination, self.quality, 'latest.json'), self) |
| 147 | # Write version details blob as the commit id |
| 148 | if self.version: |
| 149 | vsc.Utility.write_json(os.path.join( |
| 150 | destination, self.quality, f'{self.version}.json'), self) |
| 151 | |
| 152 | def __repr__(self): |
| 153 | strs = f"<{self.__class__.__name__}> {self.quality}/{self.identity}" |