Skip to content

Commit

Permalink
Don't move, file doesn't exist yet
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudotensor committed Nov 7, 2024
1 parent 61b6b30 commit ac1b5bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions openai_server/autogen_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,7 @@ def __execute_code_dont_check_setup(self, code_blocks: List[CodeBlock]) -> Comma
filename.endswith('.py'):
# switch back to shell if was wrongly .py extension
code_block.language = lang = 'shell'
new_filename = filename.replace('.py', '.sh')
shutil.move(filename, new_filename)
filename = new_filename
filename = filename.replace('.py', '.sh')
# override lang if filename is detected, less error-prone than using code block lang
elif filename and filename.endswith('.sh'):
code_block.language = lang = 'shell'
Expand Down
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "f7971ea17dede7ebb5dd9eaa7d3cb730c4e48bb0"
__version__ = "61b6b30f9b8a64dda74893bf76727dc7d0262dd0"

0 comments on commit ac1b5bd

Please sign in to comment.