rda-python-common 1.0.33__py3-none-any.whl → 1.0.35__py3-none-any.whl

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.

@@ -259,25 +259,23 @@ def send_customized_email(logmsg, emlmsg, logact = 0):
259
259
  logmsg += ': '
260
260
  else:
261
261
  logmsg = ''
262
+ msg = emlmsg
262
263
  for ekey in entries:
263
264
  entry = entries[ekey][0]
264
- if re.search(r'(^|\n){}:\s*\n'.format(entry), emlmsg, re.I):
265
- ms = None
266
- else:
267
- ms = re.search(r'(^|\n){}:\s*(.+)\n'.format(entry), emlmsg, re.I)
265
+ ms = re.search(r'(^|\n)({}: *(.*)\n)'.format(entry), emlmsg, re.I)
268
266
  if ms:
269
- entries[ekey][2] = ms.group(2)
267
+ vals = ms.groups()
268
+ msg = msg.replace(vals[1], '')
269
+ if vals[2]: entries[ekey][2] = vals[2]
270
270
  elif logact and 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 != SUCCESS and PGLOG['EMLSEND']: ret = pgsystem(PGLOG['EMLSEND'], logact, 4, emlmsg)
275
+
273
276
  logmsg += "Email " + entries['to'][2]
274
277
  if entries['cc'][2]: logmsg += " Cc'd " + entries['cc'][2]
275
278
  logmsg += " Subject: " + entries['sb'][2]
276
-
277
- ret = FAILURE
278
- if PGLOG['EMLSEND']: ret = pgsystem(PGLOG['EMLSEND'], logact, 4, emlmsg)
279
- if not ret: ret = send_python_email(entries['sb'][2], entries['to'][2], emlmsg, entries['fr'][2], entries['cc'][2], logact)
280
-
281
279
  if ret:
282
280
  log_email(emlmsg)
283
281
  if logact: pglog(logmsg, logact&(~EXITLG))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_common
3
- Version: 1.0.33
3
+ Version: 1.0.35
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
@@ -1,15 +1,15 @@
1
1
  rda_python_common/PgCMD.py,sha256=EYjG2Z4zEnvsXE1z-jt5UaNoEKxnOYYiMMzvW6HrKA4,20597
2
2
  rda_python_common/PgDBI.py,sha256=12qnRXO7pWv8togtTsOvtVuGtwixnR-s2vLGPpdDfHw,74658
3
3
  rda_python_common/PgFile.py,sha256=KnG9S0bgXAAhQIoSJWf3zON8xIua3do4New4O_qdlwg,98468
4
- rda_python_common/PgLOG.py,sha256=kRoUGW5xG5SI7Ubb41RAbnSKItSJ59x8-tGDV52Q810,55251
4
+ rda_python_common/PgLOG.py,sha256=GcV6b5vaBZlk5JCOnxdWDOWP-LcU4GjIZB8_cJseK2E,55221
5
5
  rda_python_common/PgLock.py,sha256=12i84nsGBuifSyPnm8IR63LvHvRuVU573D5QKFlHdOI,22623
6
6
  rda_python_common/PgOPT.py,sha256=zX8lWFdfV6GxjLKfMc9eM76mjIjss_ulPieerejcmks,55936
7
7
  rda_python_common/PgSIG.py,sha256=ZVM9Qz6yIFurwIQJtV5-CFbKOTdFsZ-Rs95SEpDFgNk,35795
8
8
  rda_python_common/PgSplit.py,sha256=QKPbF55m8KCTGmwVwL3uG_nuylCC4FSVfLuXeLjJHbE,8816
9
9
  rda_python_common/PgUtil.py,sha256=OqESKCd72b9g8m8jwjPJhXDtPYlW6G8oSOhwChvz2Cg,48600
10
10
  rda_python_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- rda_python_common-1.0.33.dist-info/licenses/LICENSE,sha256=1dck4EAQwv8QweDWCXDx-4Or0S8YwiCstaso_H57Pno,1097
12
- rda_python_common-1.0.33.dist-info/METADATA,sha256=0i7NzCeJ-p0KhJqhbLLojt_MeXzsNwlLl2EfDzg-7vo,716
13
- rda_python_common-1.0.33.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
- rda_python_common-1.0.33.dist-info/top_level.txt,sha256=KVQmx7D3DD-jsiheqL8HdTrRE14hpRnZY5_ioMArA5k,18
15
- rda_python_common-1.0.33.dist-info/RECORD,,
11
+ rda_python_common-1.0.35.dist-info/licenses/LICENSE,sha256=1dck4EAQwv8QweDWCXDx-4Or0S8YwiCstaso_H57Pno,1097
12
+ rda_python_common-1.0.35.dist-info/METADATA,sha256=02eefatMIkApUZT1YEL1HYHVPqp6wxgQ5NDJITPSpX8,716
13
+ rda_python_common-1.0.35.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
+ rda_python_common-1.0.35.dist-info/top_level.txt,sha256=KVQmx7D3DD-jsiheqL8HdTrRE14hpRnZY5_ioMArA5k,18
15
+ rda_python_common-1.0.35.dist-info/RECORD,,