From 1643d15e14d355d566ec2ea2090c300cee596662 Mon Sep 17 00:00:00 2001 From: Susanooo Date: Wed, 27 Nov 2024 03:16:59 +0000 Subject: [PATCH] Remove unused import packages and optimize the code. Signed-off-by: Susanooo --- common/tool_cmd.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/tool_cmd.py b/common/tool_cmd.py index 9bfe41b..38d951a 100644 --- a/common/tool_cmd.py +++ b/common/tool_cmd.py @@ -3,8 +3,6 @@ # cython:language_level=3 import argparse -import datetime -import sys import platform from common.command import Command @@ -18,7 +16,7 @@ class ToolCmd: # start add for perf/offcpu command line parser check def __check_perf_cmdline(self, args): - error_msg = [] + error_msg = "" if args.perf_enable_type: if not args.perf_pid: error_msg = "need to specify --pid option" @@ -30,7 +28,7 @@ class ToolCmd: return error_msg def __check_offcpu_cmdline(self, args): - error_msg = [] + error_msg = "" if args.offcpu: if not args.offcpu_pid: error_msg = "need to specify --offcpu_pid option" -- Gitee