Example #1
0
    def check_usage(self):
        # validate arguments
        if self.option_def(CmdLine.Switches[CmdLine.help_index], False,
                           CmdLine.Help):
            from force_init import force_usage

            force_usage(UsageStr)
Example #2
0
 def check_usage(self):
     # validate arguments
     if self.option_def(CmdLine.Switches[CmdLine.help], False,
                        CmdLine.Help):
         # if self.get_option( ["-h","--" + CmdLine.Switches[CmdLine.help].replace("=", "" )], False ):
         from force_init import force_usage
         force_usage(UsageStr)
Example #3
0
        if not PathUtils.chdir(the_force_root, False):
            Msg.dbg(
                "Directory Unchanged, using the current directory for output"
            )

        my_module.run()
        Msg.dbg("Test Completed ....\n")
        Msg.blank()
        sys.exit(40)

    except getopt.GetoptError as arg_ex:

        from force_init import force_usage

        Msg.error_trace("[ERROR] - " + str(arg_ex))
        force_usage(UsageStr)
        sys.exit(41)

    except Exception as arg_ex:

        from force_init import force_usage

        Msg.err(
            "[ERROR] - An Unhandled Error has Occurred during run of "
            + str(sys.argv[0])
        )
        traceback.print_exc(file=sys.stdout)
        Msg.error_trace(str(arg_ex))
        force_usage(UsageStr)
        sys.exit(42)