Skip to content

Commit 623b82c

Browse files
authored
Merge pull request #61 from NCAR/hua-work-common
None to '' for ekey
2 parents 4253797 + 927d095 commit 623b82c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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)