Skip to content

Commit 1a495c2

Browse files
committed
Allow for prompts to work if there is no config file (such as in test)
1 parent 59fb7d0 commit 1a495c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aicodebot/prompts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def get_personality_prompt():
5959
personality = os.getenv("AICODEBOT_PERSONALITY")
6060
else:
6161
config = read_config()
62-
personality = config.get("personality", default_personality)
62+
personality = (config or {}).get("personality", default_personality)
6363

6464
if personality not in PERSONALITIES:
6565
raise ValueError(f"Personality {personality} not found")

0 commit comments

Comments
 (0)