Skip to content

Commit

Permalink
Support repo-specific configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
okotek committed Aug 1, 2023
1 parent bfe7304 commit ab607d7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pr_agent/agent/pr_agent.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
import os
import shlex
import tempfile
Expand Down Expand Up @@ -47,7 +48,10 @@ async def handle_request(self, pr_url, request) -> bool:
get_settings().load_file(repo_settings_file)
finally:
if repo_settings_file:
os.remove(repo_settings_file)
try:
os.remove(repo_settings_file)
except Exception as e:
logging.error(f"Failed to remove temporary settings file {repo_settings_file}", e)

# Then, apply user specific settings if exists
request = request.replace("'", "\\'")
Expand Down

0 comments on commit ab607d7

Please sign in to comment.