rda-python-common 1.0.44__tar.gz → 1.0.46__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.44 → rda_python_common-1.0.46}/PKG-INFO +1 -1
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/pyproject.toml +1 -1
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common/PgFile.py +11 -9
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common/PgLOG.py +7 -4
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common.egg-info/PKG-INFO +1 -1
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/LICENSE +0 -0
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/README.md +0 -0
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/setup.cfg +0 -0
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common/PgCMD.py +0 -0
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common/PgDBI.py +0 -0
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common/PgLock.py +0 -0
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common/PgOPT.py +0 -0
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common/PgSIG.py +0 -0
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common/PgSplit.py +0 -0
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common/PgUtil.py +0 -0
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common/__init__.py +0 -0
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common.egg-info/SOURCES.txt +0 -0
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common.egg-info/dependency_links.txt +0 -0
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common.egg-info/requires.txt +0 -0
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common.egg-info/top_level.txt +0 -0
- {rda_python_common-1.0.44 → rda_python_common-1.0.46}/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.46
|
|
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
|
|
@@ -1664,7 +1664,7 @@ def local_file_stat(file, fstat, opt, logact):
|
|
|
1664
1664
|
if opt&8:
|
|
1665
1665
|
info['gid'] = fstat.st_gid
|
|
1666
1666
|
info['group'] = grp.getgrgid(info['gid']).gr_name
|
|
1667
|
-
if opt&32: info['checksum'] = get_md5sum(file, 0, logact)
|
|
1667
|
+
if opt&32 and info['isfile']: info['checksum'] = get_md5sum(file, 0, logact)
|
|
1668
1668
|
|
|
1669
1669
|
return info
|
|
1670
1670
|
|
|
@@ -2305,16 +2305,18 @@ def get_md5sum(file, count = 0, logact = 0):
|
|
|
2305
2305
|
if count > 0:
|
|
2306
2306
|
checksum = [None]*count
|
|
2307
2307
|
for i in range(count):
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2308
|
+
if op.isfile(file[i]):
|
|
2309
|
+
chksm = PgLOG.pgsystem(cmd + file[i], logact, 20)
|
|
2310
|
+
if chksm:
|
|
2311
|
+
ms = re.search(r'(\w{32})', chksm)
|
|
2312
|
+
if ms: checksum[i] = ms.group(1)
|
|
2312
2313
|
else:
|
|
2313
|
-
chksm = PgLOG.pgsystem(cmd + file, logact, 20)
|
|
2314
2314
|
checksum = None
|
|
2315
|
-
if
|
|
2316
|
-
|
|
2317
|
-
if
|
|
2315
|
+
if op.isfile(file):
|
|
2316
|
+
chksm = PgLOG.pgsystem(cmd + file, logact, 20)
|
|
2317
|
+
if chksm:
|
|
2318
|
+
ms = re.search(r'(\w{32})', chksm)
|
|
2319
|
+
if ms: checksum = ms.group(1)
|
|
2318
2320
|
|
|
2319
2321
|
return checksum
|
|
2320
2322
|
|
|
@@ -354,9 +354,12 @@ def log_email(emlmsg):
|
|
|
354
354
|
if not CPID['PID']: CPID['PID'] = "{}-{}-{}".format(PGLOG['HOSTNAME'], get_command(), PGLOG['CURUID'])
|
|
355
355
|
cmdstr = "{} {} at {}\n".format(CPID['PID'], break_long_string(CPID['CMD'], 40, "...", 1), current_datetime())
|
|
356
356
|
fn = "{}/{}".format(PGLOG['LOGPATH'], PGLOG['EMLFILE'])
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
357
|
+
try:
|
|
358
|
+
f = open(fn, 'a')
|
|
359
|
+
f.write(cmdstr + emlmsg)
|
|
360
|
+
f.close()
|
|
361
|
+
except FileNotFoundError as e:
|
|
362
|
+
print(e)
|
|
360
363
|
|
|
361
364
|
#
|
|
362
365
|
# Function: cmdlog(cmdline)
|
|
@@ -474,7 +477,7 @@ def write_message(msg, file, logact):
|
|
|
474
477
|
if logact&BRKLIN: OUT.write("\n")
|
|
475
478
|
if logact&SEPLIN: OUT.write(PGLOG['SEPLINE'])
|
|
476
479
|
OUT.write(msg)
|
|
477
|
-
if errlog and not logact&(EMLALL|SKPTRC): OUT.write(get_call_trace())
|
|
480
|
+
if errlog and file and not logact&(EMLALL|SKPTRC): OUT.write(get_call_trace())
|
|
478
481
|
if doclose: OUT.close()
|
|
479
482
|
|
|
480
483
|
#
|
{rda_python_common-1.0.44 → rda_python_common-1.0.46}/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.46
|
|
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
|
{rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common.egg-info/requires.txt
RENAMED
|
File without changes
|
{rda_python_common-1.0.44 → rda_python_common-1.0.46}/src/rda_python_common.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|