mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
Fix: enable_line_profiler() doesn't return a value - handle ImportError properly
This commit is contained in:
parent
1544e8f971
commit
5f84eb7001
1 changed files with 3 additions and 1 deletions
|
|
@ -160,7 +160,9 @@ def wrap_function_with_line_profiler(module: Any, function_name: str) -> bool:
|
|||
Returns:
|
||||
True if wrapping was successful, False otherwise
|
||||
"""
|
||||
if not enable_line_profiler():
|
||||
try:
|
||||
enable_line_profiler() # May raise ImportError if not available
|
||||
except ImportError:
|
||||
return False
|
||||
|
||||
if _line_profiler is None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue