rda-python-common 2.0.7__tar.gz → 2.0.10__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.
Files changed (33) hide show
  1. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/PKG-INFO +1 -1
  2. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/pyproject.toml +1 -1
  3. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/PgDBI.py +5 -4
  4. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/pg_dbi.py +5 -4
  5. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common.egg-info/PKG-INFO +1 -1
  6. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/LICENSE +0 -0
  7. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/README.md +0 -0
  8. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/setup.cfg +0 -0
  9. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/PgCMD.py +0 -0
  10. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/PgFile.py +0 -0
  11. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/PgLOG.py +0 -0
  12. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/PgLock.py +0 -0
  13. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/PgOPT.py +0 -0
  14. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/PgSIG.py +0 -0
  15. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/PgSplit.py +0 -0
  16. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/PgUtil.py +0 -0
  17. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/__init__.py +0 -0
  18. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/pg_cmd.py +0 -0
  19. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/pg_file.py +0 -0
  20. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/pg_lock.py +0 -0
  21. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/pg_log.py +0 -0
  22. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/pg_opt.py +0 -0
  23. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/pg_password.py +0 -0
  24. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/pg_sig.py +0 -0
  25. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/pg_split.py +0 -0
  26. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/pg_util.py +0 -0
  27. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common/pgpassword.py +0 -0
  28. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common.egg-info/SOURCES.txt +0 -0
  29. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common.egg-info/dependency_links.txt +0 -0
  30. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common.egg-info/entry_points.txt +0 -0
  31. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common.egg-info/requires.txt +0 -0
  32. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/src/rda_python_common.egg-info/top_level.txt +0 -0
  33. {rda_python_common-2.0.7 → rda_python_common-2.0.10}/test/test_common.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_common
3
- Version: 2.0.7
3
+ Version: 2.0.10
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rda_python_common"
7
- version = "2.0.7"
7
+ version = "2.0.10"
8
8
  authors = [
9
9
  { name="Zaihua Ji", email="zji@ucar.edu" },
10
10
  ]
@@ -323,11 +323,12 @@ def aborttran(autocommit = True):
323
323
  #
324
324
  def record_dscheck_error(errmsg, logact = PGDBI['EXITLG']):
325
325
 
326
- cnd = PgLOG.PGLOG['DSCHECK']['chkcnd']
326
+ check = PgLOG.PGLOG['DSCHECK']
327
+ chkcnd = check['chkcnd'] if 'chkcnd' in check else "cindex = {}".format(check['cindex'])
328
+ dflags = check['dflags'] if 'dflags' in check else ''
327
329
  if PgLOG.PGLOG['NOQUIT']: PgLOG.PGLOG['NOQUIT'] = 0
328
- dflags = PgLOG.PGLOG['DSCHECK']['dflags']
329
330
 
330
- pgrec = pgget("dscheck", "mcount, tcount, lockhost, pid", cnd, logact)
331
+ pgrec = pgget("dscheck", "mcount, tcount, lockhost, pid", chkcnd, logact)
331
332
  if not pgrec: return 0
332
333
  if not pgrec['pid'] and not pgrec['lockhost']: return 0
333
334
  (chost, cpid) = PgLOG.current_process_info()
@@ -350,7 +351,7 @@ def record_dscheck_error(errmsg, logact = PGDBI['EXITLG']):
350
351
  if pgrec['tcount'] > 1: errmsg = "Try {}: {}".format(pgrec['tcount'], errmsg)
351
352
  record['errmsg'] = errmsg
352
353
 
353
- return pgupdt("dscheck", record, cnd, logact)
354
+ return pgupdt("dscheck", record, chkcnd, logact)
354
355
 
355
356
  #
356
357
  # local function to log query error
@@ -248,10 +248,11 @@ class PgDBI(PgLOG):
248
248
  # record error message to dscheck record and clean the lock
249
249
  def record_dscheck_error(self, errmsg, logact = None):
250
250
  if logact is None: logact = self.PGDBI['EXITLG']
251
- cnd = self.PGLOG['DSCHECK']['chkcnd']
251
+ check = self.PGLOG['DSCHECK']
252
+ chkcnd = check['chkcnd'] if 'chkcnd' in check else "cindex = {}".format(check['cindex'])
253
+ dflags = check['dflags'] if 'dflags' in check else ''
252
254
  if self.PGLOG['NOQUIT']: self.PGLOG['NOQUIT'] = 0
253
- dflags = self.PGLOG['DSCHECK']['dflags']
254
- pgrec = self.pgget("dscheck", "mcount, tcount, lockhost, pid", cnd, logact)
255
+ pgrec = self.pgget("dscheck", "mcount, tcount, lockhost, pid", chkcnd, logact)
255
256
  if not pgrec: return 0
256
257
  if not pgrec['pid'] and not pgrec['lockhost']: return 0
257
258
  (chost, cpid) = self.current_process_info()
@@ -271,7 +272,7 @@ class PgDBI(PgLOG):
271
272
  errmsg = self.break_long_string(errmsg, 512, None, 50, None, 50, 25)
272
273
  if pgrec['tcount'] > 1: errmsg = "Try {}: {}".format(pgrec['tcount'], errmsg)
273
274
  record['errmsg'] = errmsg
274
- return self.pgupdt("dscheck", record, cnd, logact)
275
+ return self.pgupdt("dscheck", record, chkcnd, logact)
275
276
 
276
277
  # local function to log query error
277
278
  def qelog(self, dberror, sleep, sqlstr, vals, pgcnt, logact = None):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_common
3
- Version: 2.0.7
3
+ Version: 2.0.10
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