Skip to content

Commit afeb831

Browse files
committed
Automation Toolkit Release v10.1
1 parent cc8a265 commit afeb831

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

cd3_automation_toolkit/setUpOCI.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -915,17 +915,16 @@ def execute(command):
915915
parser = argparse.ArgumentParser(description='Sets Up OCI via TF')
916916
parser.add_argument('propsfile', help="Full Path of properties file containing input variables. eg setUpOCI.properties")
917917
args = parser.parse_args()
918-
config = configparser.RawConfigParser()
919-
config.read(args.propsfile)
918+
config1 = configparser.RawConfigParser()
919+
config1.read(args.propsfile)
920920

921921
#Read Config file Variables
922922
try:
923-
non_gf_tenancy = config.get('Default', 'non_gf_tenancy').strip().lower() == 'true'
924-
inputfile = config.get('Default','cd3file').strip()
925-
outdir = config.get('Default', 'outdir').strip()
926-
prefix = config.get('Default', 'prefix').strip()
927-
outdir_structure = config.get('Default', 'outdir_structure_file').strip()
928-
config = config.get('Default', 'config_file').strip() or DEFAULT_LOCATION
923+
non_gf_tenancy = config1.get('Default', 'non_gf_tenancy').strip().lower() == 'true'
924+
inputfile = config1.get('Default','cd3file').strip()
925+
outdir = config1.get('Default', 'outdir').strip()
926+
prefix = config1.get('Default', 'prefix').strip()
927+
config = config1.get('Default', 'config_file').strip() or DEFAULT_LOCATION
929928

930929
if not outdir:
931930
exit_menu('input outdir location cannot be left blank. Exiting... ')
@@ -936,9 +935,13 @@ def execute(command):
936935
elif '.xls' not in inputfile:
937936
exit_menu('valid formats for input cd3file are either .xls or .xlsx')
938937
except Exception as e:
939-
#exit_menu(e + "Check if input properties exist and try again..exiting...")
940938
exit_menu(str(e) + ". Check input properties file and try again. Exiting... ")
941939

940+
try:
941+
outdir_structure = config1.get('Default', 'outdir_structure_file').strip()
942+
except Exception as e:
943+
outdir_structure = ''
944+
942945
Option = namedtuple('Option', ['name', 'callback', 'text'])
943946
extra = ''
944947

0 commit comments

Comments
 (0)