diff --git a/chipforge/firmware/interface/hk.py b/chipforge/firmware/interface/hk.py index 9dc59e6a6e775bce70a70391d759ee0271b8a82a..f2a92bce35d61e613537e4315111032da3a10d48 100644 --- a/chipforge/firmware/interface/hk.py +++ b/chipforge/firmware/interface/hk.py @@ -83,7 +83,10 @@ class Claims: def write_back(self): raw_claims = [{'path': claim.path, 'owner': claim.owner, 'expires': claim.expires.strftime('%Y-%m-%dT%H:%M:%S')} for claim in self.claims] with open(self.path, 'w+') as file: - os.chmod(self.path, 0o777) + try: + os.chmod(self.path, 0o777) + except: + pass json.dump(raw_claims, file) def claim(self, device: HKSpiBase, fail_soft=False, override=False):