diff --git a/pyproject.toml b/pyproject.toml index aa92fd1..3fa0fe0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "rda_python_common" -version = "1.0.47" +version = "1.0.49" authors = [ { name="Zaihua Ji", email="zji@ucar.edu" }, ] diff --git a/src/rda_python_common/PgOPT.py b/src/rda_python_common/PgOPT.py index 93acba3..5794e1b 100644 --- a/src/rda_python_common/PgOPT.py +++ b/src/rda_python_common/PgOPT.py @@ -1683,9 +1683,16 @@ def send_request_email_notice(pgrqst, errmsg, fcount, rstat, readyfile = None, p for ekey in einfo: if ekey == 'CCD' and not einfo['CCD']: - ebuf = re.sub(r'Cc:\s*\s*', '', ebuf) + mp = r'Cc:\s*\s*' + rep = '' else: - ebuf = re.sub(r'<{}>'.format(ekey), einfo[ekey], ebuf) + mp = r'<{}>'.format(ekey) + rep = einfo[ekey] + if rep is None: + PgLOG.pglog("{}.{}: None ekey value for reuqest email".format(pgrqst['rindex'], ekey), + PGOPT['wrnlog']|PgLOG.FRCLOG) + rep = '' + ebuf = re.sub(mp, rep, ebuf) if PgLOG.PGLOG['DSCHECK'] and not pgpart: tbl = "dscheck"