Skip to content

Commit

Permalink
Email feature appears to work
Browse files Browse the repository at this point in the history
Fixed the template file so that skip-preview-namelist option works
and it so that get_value looked over all of env_batch.xml. Everything
appears to work as expected.
  • Loading branch information
Erich L Foster committed Jul 13, 2017
1 parent 5e2424d commit bb19ad6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion config/acme/machines/template.case.run
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ OR
parser.add_argument("--caseroot",
help="Case directory to build")


parser.add_argument("--skip-preview-namelist", action="store_true",
help="Skip calling preview-namelist during case.run")

Expand Down
7 changes: 4 additions & 3 deletions scripts/lib/CIME/XML/env_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def _submit_single_job(self, case, job, depid=None, no_batch=False,
submitargs += " " + batch_args

if mail_user is not None:
mail_user_flag = self.get_value('batch_mail_flag')
mail_user_flag = self.get_value('batch_mail_flag', subgroup=None)
if mail_user_flag is not None:
submitargs += " " + mail_user_flag + " " + mail_user
if 'never' not in mail_type:
Expand Down Expand Up @@ -457,8 +457,9 @@ def _submit_single_job(self, case, job, depid=None, no_batch=False,
return jobid

def get_batch_mail_type(self, mail_type='never'):
mail_types_flag = self.get_value("batch_mail_type_flag")
raw = self.get_value("batch_mail_type")
mail_type_flag = self.get_value("batch_mail_type_flag", subgroup=None)
raw = self.get_value("batch_mail_type", subgroup=None)
print raw
mail_types = [item.strip() for item in raw.split(",")]
idx = ["never", "all", "begin", "end", "fail"].index(mail_type)

Expand Down

0 comments on commit bb19ad6

Please sign in to comment.