Skip to content

Commit 859bb14

Browse files
author
zaihuaji
committed
None to '' for ekey
1 parent f8f91bd commit 859bb14

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "rda_python_common"
7-
version = "1.0.47"
7+
version = "1.0.48"
88
authors = [
99
{ name="Zaihua Ji", email="zji@ucar.edu" },
1010
]

src/rda_python_common/PgOPT.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,9 +1683,16 @@ def send_request_email_notice(pgrqst, errmsg, fcount, rstat, readyfile = None, p
16831683

16841684
for ekey in einfo:
16851685
if ekey == 'CCD' and not einfo['CCD']:
1686-
ebuf = re.sub(r'Cc:\s*<CCD>\s*', '', ebuf)
1686+
mp = r'Cc:\s*<CCD>\s*'
1687+
rep = ''
16871688
else:
1688-
ebuf = re.sub(r'<{}>'.format(ekey), einfo[ekey], ebuf)
1689+
mp = r'<{}>'.format(ekey)
1690+
rep = einfo[ekey]
1691+
if rep is None:
1692+
PgLOG.pglog("{}.{}: None ekey value for reuqest email".format(pgrqst['rindex'], ekey),
1693+
PGOPT['wrnlog']|PgLOG.FRCLOG)
1694+
rep = ''
1695+
ebuf = re.sub(mp, rep, ebuf)
16891696

16901697
if PgLOG.PGLOG['DSCHECK'] and not pgpart:
16911698
tbl = "dscheck"

0 commit comments

Comments
 (0)