Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

Commit

Permalink
fix: Add missing automatic mkdir to store announcements (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Nov 26, 2021
1 parent 07a00ab commit 775700c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/185.fix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix missing auto-creation of local-state directory when storing server announcements
1 change: 1 addition & 0 deletions src/ai/backend/client/cli/announcement.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def announce(msg: str, only_once: bool = True) -> None:
if only_once and _printed_announcement:
return
local_state_path = Path(appdirs.user_state_dir('backend.ai', 'Lablup'))
local_state_path.mkdir(parents=True, exist_ok=True)
try:
with open(local_state_path / 'announcement.json', 'rb') as f_current:
last_state = json.load(f_current)
Expand Down

0 comments on commit 775700c

Please sign in to comment.