Skip to content

Commit 23e5b0e

Browse files
committed
fix import unitest
1 parent 53f48c7 commit 23e5b0e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

veadk/cloud/cloud_app.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -425,15 +425,17 @@ async def message_send(
425425
result = res.root.result # type: ignore
426426
try:
427427
from a2a.types import Task
428+
429+
is_task = isinstance(result, Task)
428430
except ImportError:
429-
return result
431+
is_task = False
430432

431-
if isinstance(result, Task):
432-
if result.history:
433+
if is_task:
434+
if result.history: # type: ignore
433435
return next(
434436
(
435437
msg
436-
for msg in reversed(result.history)
438+
for msg in reversed(result.history) # type: ignore
437439
if msg.role == "agent"
438440
),
439441
None,

0 commit comments

Comments
 (0)