Skip to content

Commit

Permalink
Merge pull request #163 from colin-harkins/develop_outputdirerror2
Browse files Browse the repository at this point in the history
Add error when output_dir not specified (updated)
  • Loading branch information
colin-harkins authored Feb 28, 2023
2 parents 5e9e6f6 + 0d675ac commit 9e4e803
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions melodies_monet/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,11 @@ def read_control(self, control=None):
# set analysis time
self.start_time = pd.Timestamp(self.control_dict['analysis']['start_time'])
self.end_time = pd.Timestamp(self.control_dict['analysis']['end_time'])
self.output_dir = os.path.expandvars(
self.control_dict['analysis']['output_dir'])
if 'output_dir' in self.control_dict['analysis'].keys():
self.output_dir = os.path.expandvars(
self.control_dict['analysis']['output_dir'])
else:
raise Exception('output_dir was not specified and is required. Please set analysis.output_dir in the control file.')
if 'output_dir_save' in self.control_dict['analysis'].keys():
self.output_dir_save = os.path.expandvars(
self.control_dict['analysis']['output_dir_save'])
Expand Down

0 comments on commit 9e4e803

Please sign in to comment.