Skip to content

Commit 72c4dc5

Browse files
markurtzsjmonson
andauthored
Update src/guidellm/utils/functions.py
Co-authored-by: Samuel Monson <[email protected]> Signed-off-by: Mark Kurtz <[email protected]>
1 parent 02f97ff commit 72c4dc5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/guidellm/utils/functions.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,7 @@ def safe_format_timestamp(
124124
:param default: Value to return if timestamp is invalid or None
125125
:return: Formatted timestamp string or default value
126126
"""
127-
if timestamp is None or timestamp < 0 or timestamp > 2**31:
128-
return default
129-
130127
try:
131128
return datetime.fromtimestamp(timestamp).strftime(format_)
132-
except (ValueError, OverflowError, OSError):
129+
except (ValueError, TypeError, OverflowError, OSError):
133130
return default

0 commit comments

Comments
 (0)