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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ PgLOG.pglog("hello", PgLOG.LOGWRN)
python -c "import rda_python_common; print(rda_python_common.__version__)"
```

You should see the installed version (currently `3.0.19`). If the import
You should see the installed version (currently `3.0.20`). If the import
fails, double-check that the active Python environment is the one where you
ran `pip install`.

Expand Down
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 = "3.0.19"
version = "3.0.20"
authors = [
{ name="Zaihua Ji", email="zji@ucar.edu" },
]
Expand Down
2 changes: 1 addition & 1 deletion src/rda_python_common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

from . import PgLOG, PgUtil, PgDBI, PgFile, PgLock, PgCMD, PgSIG, PgOPT, PgSplit

__version__ = "3.0.19"
__version__ = "3.0.20"

__all__ = [
"PgLOG",
Expand Down
4 changes: 3 additions & 1 deletion src/rda_python_common/pg_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ def __init__(self):
# record how many errors happen for working with HPSS, local or remote machines
self.ECNTS = {'D': 0, 'H': 0, 'L': 0, 'R': 0, 'O': 0, 'B': 0}
# up limits for how many continuing errors allowed
self.ELMTS = {'D': 20, 'H': 20, 'L': 20, 'R': 20, 'O': 10, 'B': 10}
# 'B' is 5 because a failed Globus transfer counts once; it used to be logged
# twice per failure, so the old limit of 10 also gave up after 5 failures
self.ELMTS = {'D': 20, 'H': 20, 'L': 20, 'R': 20, 'O': 10, 'B': 5}
# down storage hostnames & paths
self.DHOSTS = {
'G': self.PGLOG['GPFSNAME'],
Expand Down
6 changes: 5 additions & 1 deletion src/rda_python_common/pg_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,13 @@ def set_email(self, msg, logact=0):
if self.PGLOG['PRGMSG']:
msg = self.PGLOG['PRGMSG'] + "\n" + msg
self.PGLOG['PRGMSG'] = ""
# callers usually end the message with their own '!', so do not add a second
# one, and drop it before continuing the sentence with the error count
if self.PGLOG['ERRCNT'] == 0:
if not msg.endswith('\n'): msg += "!\n"
if not msg.endswith('\n'):
msg += "\n" if msg.endswith('!') else "!\n"
Comment on lines +255 to +256
else:
if msg.endswith('!'): msg = msg[:-1]
if self.PGLOG['ERRCNT'] == 1:
msg += " with 1 Error:\n"
else:
Expand Down
Loading