File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212import os
1313import sys
1414import time
15+ import platform
1516from argparse import ArgumentParser
1617
1718from servicereportpkg .repair import Repair
2122from servicereportpkg .global_context import TOOL_NAME
2223from servicereportpkg .logger import get_default_logger
2324from servicereportpkg .utils import trigger_kernel_crash
25+ from servicereportpkg .global_context import SUPPORTED_ARCHS
2426
2527
2628__version__ = '2.2.2'
@@ -104,10 +106,25 @@ def get_dump_plugin(validation_results):
104106 return None
105107
106108
109+ def is_arch_supported ():
110+ """Returns True if the tool supports current architecture else False"""
111+
112+ arch = platform .machine ().lower ()
113+ if arch in SUPPORTED_ARCHS :
114+ return True
115+
116+ return False
117+
118+
107119def main ():
108120 """Entry point of ServiceReport tool"""
109121
110122 cmd_opts = parse_commandline_args (sys .argv [1 :])
123+
124+ if not is_arch_supported ():
125+ print ("\n Unsupported Architecure!" )
126+ return 1
127+
111128 log = setup_logger (cmd_opts .log_file , cmd_opts .verbose )
112129
113130 print (TOOL_NAME + " " + get_version ()+ "\n " )
Original file line number Diff line number Diff line change 88import sys
99
1010TOOL_NAME = os .path .basename (sys .argv [0 ])
11+ SUPPORTED_ARCHS = ["ppc64le" ]
You can’t perform that action at this time.
0 commit comments