Skip to content

Commit

Permalink
Fxied permission error in clear cache (#573)
Browse files Browse the repository at this point in the history
  • Loading branch information
ywkim312 authored May 14, 2024
1 parent 6435f71 commit 8b88128
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Changed
- join dataset has an option for only keeping the table dataset fields [#299](https://github.com/IN-CORE/pyincore/issues/299)

## [Unreleased]

### Fixed
- Permission error in clearing cache process [#563](https://github.com/IN-CORE/pyincore/issues/563)

## [1.18.1] - 2024-04-30

### Changed
Expand Down
5 changes: 4 additions & 1 deletion pyincore/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,11 @@ def clear_cache(self):
if not os.path.isdir(self.hashed_svc_data_dir):
logger.warning("Cached folder doesn't exist")
return None
try:
shutil.rmtree(self.hashed_svc_data_dir)
except PermissionError as e:
print(f"Error clearing cache : {e}")

shutil.rmtree(self.hashed_svc_data_dir)
# clear entry from service.json
update_hash_entry("edit", hashed_url=self.hashed_service_url)
return
Expand Down

0 comments on commit 8b88128

Please sign in to comment.