rda-python-common 1.0.38__tar.gz → 1.0.39__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rda-python-common might be problematic. Click here for more details.
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/PKG-INFO +1 -1
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/pyproject.toml +1 -1
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common/PgLOG.py +12 -10
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common.egg-info/PKG-INFO +1 -1
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/LICENSE +0 -0
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/README.md +0 -0
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/setup.cfg +0 -0
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common/PgCMD.py +0 -0
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common/PgDBI.py +0 -0
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common/PgFile.py +0 -0
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common/PgLock.py +0 -0
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common/PgOPT.py +0 -0
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common/PgSIG.py +0 -0
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common/PgSplit.py +0 -0
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common/PgUtil.py +0 -0
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common/__init__.py +0 -0
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common.egg-info/SOURCES.txt +0 -0
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common.egg-info/dependency_links.txt +0 -0
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common.egg-info/requires.txt +0 -0
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common.egg-info/top_level.txt +0 -0
- {rda_python_common-1.0.38 → rda_python_common-1.0.39}/test/test_common.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rda_python_common
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.39
|
|
4
4
|
Summary: RDA Python common library codes shared by other RDA python packages
|
|
5
5
|
Author-email: Zaihua Ji <zji@ucar.edu>
|
|
6
6
|
Project-URL: Homepage, https://github.com/NCAR/rda-python-common
|
|
@@ -246,7 +246,7 @@ def get_email():
|
|
|
246
246
|
#
|
|
247
247
|
# send a customized email with all entries included
|
|
248
248
|
#
|
|
249
|
-
def send_customized_email(logmsg, emlmsg, logact =
|
|
249
|
+
def send_customized_email(logmsg, emlmsg, logact = LOGWRN):
|
|
250
250
|
|
|
251
251
|
entries = {
|
|
252
252
|
'fr' : ["From", 1, None],
|
|
@@ -267,18 +267,20 @@ def send_customized_email(logmsg, emlmsg, logact = 0):
|
|
|
267
267
|
vals = ms.groups()
|
|
268
268
|
msg = msg.replace(vals[1], '')
|
|
269
269
|
if vals[2]: entries[ekey][2] = vals[2]
|
|
270
|
-
elif
|
|
270
|
+
elif entries[ekey][1]:
|
|
271
271
|
return pglog("{}Missing Entry '{}' for sending email".format(logmsg, entry), logact|ERRLOG)
|
|
272
272
|
|
|
273
|
-
ret = send_python_email(entries['sb'][2], entries['to'][2], msg, entries['fr'][2], entries['cc'][2])
|
|
274
|
-
if ret
|
|
273
|
+
ret = send_python_email(entries['sb'][2], entries['to'][2], msg, entries['fr'][2], entries['cc'][2], logact)
|
|
274
|
+
if ret == SUCCESS or not PGLOG['EMLSEND']: return ret
|
|
275
275
|
|
|
276
|
+
# try commandline sendmail
|
|
277
|
+
ret = pgsystem(PGLOG['EMLSEND'], logact, 4, emlmsg)
|
|
276
278
|
logmsg += "Email " + entries['to'][2]
|
|
277
279
|
if entries['cc'][2]: logmsg += " Cc'd " + entries['cc'][2]
|
|
278
280
|
logmsg += " Subject: " + entries['sb'][2]
|
|
279
|
-
if ret:
|
|
281
|
+
if ret:
|
|
280
282
|
log_email(emlmsg)
|
|
281
|
-
|
|
283
|
+
pglog(logmsg, logact&(~EXITLG))
|
|
282
284
|
else:
|
|
283
285
|
errmsg = "Error sending email: " + logmsg
|
|
284
286
|
pglog(errmsg, (logact|ERRLOG)&~EXITLG)
|
|
@@ -288,7 +290,7 @@ def send_customized_email(logmsg, emlmsg, logact = 0):
|
|
|
288
290
|
#
|
|
289
291
|
# send an email; if empty msg send email message saved in PGLOG['EMLMSG'] instead
|
|
290
292
|
#
|
|
291
|
-
def send_email(subject = None, receiver = None, msg = None, sender = None, logact =
|
|
293
|
+
def send_email(subject = None, receiver = None, msg = None, sender = None, logact = LOGWRN):
|
|
292
294
|
|
|
293
295
|
return send_python_email(subject, receiver, msg, sender, None, logact)
|
|
294
296
|
|
|
@@ -296,7 +298,7 @@ def send_email(subject = None, receiver = None, msg = None, sender = None, logac
|
|
|
296
298
|
# send an email via python module smtplib; if empty msg send email message saved
|
|
297
299
|
# in PGLOG['EMLMSG'] instead. pass cc = '' for skipping 'Cc: '
|
|
298
300
|
#
|
|
299
|
-
def send_python_email(subject = None, receiver = None, msg = None, sender = None, cc = None, logact =
|
|
301
|
+
def send_python_email(subject = None, receiver = None, msg = None, sender = None, cc = None, logact = LOGWRN):
|
|
300
302
|
|
|
301
303
|
if not msg:
|
|
302
304
|
if PGLOG['EMLMSG']:
|
|
@@ -340,7 +342,7 @@ def send_python_email(subject = None, receiver = None, msg = None, sender = None
|
|
|
340
342
|
finally:
|
|
341
343
|
eml.quit()
|
|
342
344
|
log_email(str(emlmsg))
|
|
343
|
-
|
|
345
|
+
pglog(logmsg, logact&~EXITLG)
|
|
344
346
|
return SUCCESS
|
|
345
347
|
|
|
346
348
|
#
|
|
@@ -415,7 +417,7 @@ def pglog(msg, logact = MSGLOG):
|
|
|
415
417
|
if logact&EMLALL:
|
|
416
418
|
if logact&SNDEML or not msg:
|
|
417
419
|
title = (msg if msg else "Message from {}-{}".format(PGLOG['HOSTNAME'], get_command()))
|
|
418
|
-
msg = title
|
|
420
|
+
msg = title
|
|
419
421
|
send_email(title.rstrip())
|
|
420
422
|
elif msg:
|
|
421
423
|
set_email(msg, logact)
|
{rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rda_python_common
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.39
|
|
4
4
|
Summary: RDA Python common library codes shared by other RDA python packages
|
|
5
5
|
Author-email: Zaihua Ji <zji@ucar.edu>
|
|
6
6
|
Project-URL: Homepage, https://github.com/NCAR/rda-python-common
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common.egg-info/requires.txt
RENAMED
|
File without changes
|
{rda_python_common-1.0.38 → rda_python_common-1.0.39}/src/rda_python_common.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|