diff --git a/jcloud/api/aliyun_server_light.py b/jcloud/api/aliyun_server_light.py index d1ccae0..6330091 100644 --- a/jcloud/api/aliyun_server_light.py +++ b/jcloud/api/aliyun_server_light.py @@ -840,10 +840,7 @@ def create_server_key_pair(instance_id): # 直接调用管理器方法创建密钥对 manager = _get_manager() key_pair_result = manager.create_instance_key_pair(instance_id, key_pair_name, region_id) - - # 添加调试日志 - jingrow.log_error("密钥对创建调试", f"完整的key_pair_result: {key_pair_result}") - + if not key_pair_result or not key_pair_result.get('success'): error_msg = key_pair_result.get('message', '未知错误') if key_pair_result else '返回结果为空' jingrow.log_error(f"密钥对创建失败: {error_msg}")