From ed6daa58003705a06c2c2619d12272b7427b28ce Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Sun, 5 Jan 2025 19:59:10 +0200 Subject: [PATCH] Update imports for modernrpc classes --- tcms/handlers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tcms/handlers.py b/tcms/handlers.py index 2ddc6b7248..b0f48246d1 100644 --- a/tcms/handlers.py +++ b/tcms/handlers.py @@ -3,8 +3,9 @@ from datetime import timedelta from modernrpc.handlers import JSONRPCHandler, XMLRPCHandler -from modernrpc.handlers.base import BaseResult, SuccessResult +from modernrpc.handlers.base import BaseResult from modernrpc.handlers.jsonhandler import JsonResult, JsonSuccessResult +from modernrpc.handlers.xmlhandler import XmlSuccessResult class KiwiTCMSJsonRpcHandler(JSONRPCHandler): @@ -56,7 +57,7 @@ def escape_list(result_list): __class__.escape_dict(item) def dumps_result(self, result: BaseResult) -> str: - if isinstance(result, SuccessResult): + if isinstance(result, XmlSuccessResult): if isinstance(result.data, timedelta): result.data = result.data.total_seconds() elif isinstance(result.data, dict):