diff --git a/common/tool_cmd.py b/common/tool_cmd.py index 4bbd2022245e745e757f8885812a8a175632ef00..835bce794d614264e0d93e373f2f9feda1133f3b 100644 --- a/common/tool_cmd.py +++ b/common/tool_cmd.py @@ -34,6 +34,14 @@ class ToolCmd: raise argparse.ArgumentTypeError("should set to -1 or existed process id") return val + def __check_offcpu_pid(self, val): + try: + ival = int(val) + except ValueError: + raise argparse.ArgumentTypeError("must be an integer") + + return ival + def args_help(self): #共享可选参数wpath ipath opath parent_parser = argparse.ArgumentParser(add_help=False)