@@ -915,17 +915,16 @@ def execute(command):
915
915
parser = argparse .ArgumentParser (description = 'Sets Up OCI via TF' )
916
916
parser .add_argument ('propsfile' , help = "Full Path of properties file containing input variables. eg setUpOCI.properties" )
917
917
args = parser .parse_args ()
918
- config = configparser .RawConfigParser ()
919
- config .read (args .propsfile )
918
+ config1 = configparser .RawConfigParser ()
919
+ config1 .read (args .propsfile )
920
920
921
921
#Read Config file Variables
922
922
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
929
928
930
929
if not outdir :
931
930
exit_menu ('input outdir location cannot be left blank. Exiting... ' )
@@ -936,9 +935,13 @@ def execute(command):
936
935
elif '.xls' not in inputfile :
937
936
exit_menu ('valid formats for input cd3file are either .xls or .xlsx' )
938
937
except Exception as e :
939
- #exit_menu(e + "Check if input properties exist and try again..exiting...")
940
938
exit_menu (str (e ) + ". Check input properties file and try again. Exiting... " )
941
939
940
+ try :
941
+ outdir_structure = config1 .get ('Default' , 'outdir_structure_file' ).strip ()
942
+ except Exception as e :
943
+ outdir_structure = ''
944
+
942
945
Option = namedtuple ('Option' , ['name' , 'callback' , 'text' ])
943
946
extra = ''
944
947
0 commit comments