mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-08 22:38:05 -05:00
Fix unbound variable and read_text() bugs in event services (#12297)
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
@@ -107,6 +107,7 @@ class EventServiceBase(EventService, ABC):
|
||||
)
|
||||
|
||||
start_offset = 0
|
||||
next_page_id = None
|
||||
if page_id:
|
||||
start_offset = int(page_id)
|
||||
paths = paths[start_offset:]
|
||||
|
||||
@@ -22,7 +22,7 @@ class FilesystemEventService(EventServiceBase):
|
||||
|
||||
def _load_event(self, path: Path) -> Event | None:
|
||||
try:
|
||||
content = path.read_text(str(path))
|
||||
content = path.read_text()
|
||||
content = Event.model_validate_json(content)
|
||||
return content
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user