File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -526,20 +526,26 @@ def get_param_list(cmd_str):
526526
527527
528528def get_help_list (cmd_str ):
529-
530529 data_init = ini_data ()
531530 win_exe = data_init .get_win_exe ()
532-
533531 try :
532+ my_cmd_mod = importlib .import_module (
533+ "dials.command_line." + cmd_str
534+ )
535+ single_str = my_cmd_mod .__doc__
536+ my_cmd_hlp = single_str .split ("\n " )
537+ print (" getting docstring from >> dials." + cmd_str )
538+
539+ except AttributeError :
534540 my_cmd_mod = importlib .import_module (
535541 "dials.command_line." + cmd_str
536542 )
537543 single_str = my_cmd_mod .help_message
538544 my_cmd_hlp = single_str .split ("\n " )
539545 print ("getting help message from >> dials." + cmd_str )
540546
541- except ( AttributeError , ModuleNotFoundError ) :
542- my_cmd_hlp = ["None(AttributeError )" ]
547+ except ModuleNotFoundError :
548+ my_cmd_hlp = ["None(ModuleNotFoundError )" ]
543549 inner_lst = ["dials." + cmd_str , "-h" ]
544550 try :
545551 if win_exe :
@@ -569,6 +575,10 @@ def get_help_list(cmd_str):
569575 new_line = my_proc .stdout .readline ()
570576 my_cmd_hlp .append (new_line [:- 1 ])
571577
578+ except TypeError :
579+ print ("..." + cmd_str + " ...TypeError" )
580+ my_cmd_hlp = []
581+
572582 top_trimed_lst_1 = []
573583 found_sage_pp = False
574584 for single_line in my_cmd_hlp :
You can’t perform that action at this time.
0 commit comments