diff --git a/scripts/constants.py b/scripts/constants.py index d2ca8e11..ee0b34f7 100644 --- a/scripts/constants.py +++ b/scripts/constants.py @@ -14,7 +14,7 @@ # Check the directories for the iocmanager config file VALID_HUTCH = sorted([d for d in gb.glob('/cds/group/pcds/pyps/config' - + '/*/') + + '/*/') if gb.glob(d + 'iocmanager.cfg')]) # Trim to 3 letter hutch code, include 'all' = '*' VALID_HUTCH = ['all'] + [s.rsplit(r'/', maxsplit=2)[-2] for s in VALID_HUTCH] @@ -24,4 +24,3 @@ DEF_IMGR_KEYS = ['procmgr_config', 'hosts', 'dir', 'id', 'cmd', 'flags', 'port', 'host', 'disable', 'history', 'delay', 'alias', 'hard'] - \ No newline at end of file diff --git a/scripts/getPVAliases.py b/scripts/getPVAliases.py index 7474238f..1ea5d8a6 100644 --- a/scripts/getPVAliases.py +++ b/scripts/getPVAliases.py @@ -13,9 +13,10 @@ import sys from colorama import Fore, Style +from prettytable import PrettyTable + from grep_more_ioc import (clean_ansi, find_ioc, find_parent_ioc, fix_dir, search_file, simple_prompt) -from prettytable import PrettyTable ############################################################################### # %% Functions @@ -193,8 +194,8 @@ def show_temp_table(input_data: list, col_list: list): parser = argparse.ArgumentParser( prog='gatherPVAliases', description="gathers all record <-> alias associations from a child's " - "ioc.cfg, st.cmd, and parent ioc.cfg.", - epilog='') + "ioc.cfg, st.cmd, and parent ioc.cfg.", + epilog='') # main command arguments parser.add_argument('patt', type=str) parser.add_argument('hutch', type=str) diff --git a/scripts/grep_more_ioc.py b/scripts/grep_more_ioc.py index 126ab42d..5733714d 100644 --- a/scripts/grep_more_ioc.py +++ b/scripts/grep_more_ioc.py @@ -15,9 +15,10 @@ from shutil import get_terminal_size import pandas as pd -from constants import (DEF_IMGR_KEYS, VALID_HUTCH) from colorama import Fore, Style +from constants import DEF_IMGR_KEYS, VALID_HUTCH + ############################################################################### # %% Global settings ###############################################################################