Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "rda_python_common"
version = "1.0.37"
version = "1.0.38"
authors = [
{ name="Zaihua Ji", email="zji@ucar.edu" },
]
Expand Down
7 changes: 4 additions & 3 deletions src/rda_python_common/PgLOG.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def send_customized_email(logmsg, emlmsg, logact = 0):
entries = {
'fr' : ["From", 1, None],
'to' : ["To", 1, None],
'cc' : ["Cc", 0, None],
'cc' : ["Cc", 0, ''],
'sb' : ["Subject", 1, None]
}

Expand Down Expand Up @@ -293,7 +293,8 @@ def send_email(subject = None, receiver = None, msg = None, sender = None, logac
return send_python_email(subject, receiver, msg, sender, None, logact)

#
# send an email via python module smtplib; if empty msg send email message saved in PGLOG['EMLMSG'] instead
# send an email via python module smtplib; if empty msg send email message saved
# in PGLOG['EMLMSG'] instead. pass cc = '' for skipping 'Cc: '
#
def send_python_email(subject = None, receiver = None, msg = None, sender = None, cc = None, logact = 0):

Expand Down Expand Up @@ -321,7 +322,7 @@ def send_python_email(subject = None, receiver = None, msg = None, sender = None
emlmsg['From'] = sender
emlmsg['To'] = receiver
logmsg = "Email " + receiver
if not cc: cc = PGLOG['CCDADDR']
if cc == None: cc = PGLOG['CCDADDR']
if cc:
emlmsg['Cc'] = cc
logmsg += " Cc'd " + cc
Expand Down
6 changes: 4 additions & 2 deletions src/rda_python_common/PgOPT.py
Original file line number Diff line number Diff line change
Expand Up @@ -1682,8 +1682,10 @@ def send_request_email_notice(pgrqst, errmsg, fcount, rstat, readyfile = None, p
einfo['GLOBUS_TASK_URL'] = "https://app.globus.org/activity/" + pgrqst['task_id']

for ekey in einfo:
ebuf = re.sub(r'<{}>'.format(ekey), einfo[ekey], ebuf)

if ekey == 'CCD' and not einfo['CCD']:
ebuf = re.sub(r'Cc:\s*<CCD>\s*', '', ebuf)
else:
ebuf = re.sub(r'<{}>'.format(ekey), einfo[ekey], ebuf)

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