rda-python-common 1.0.42__tar.gz → 1.0.43__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.42 → rda_python_common-1.0.43}/PKG-INFO +1 -1
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/pyproject.toml +1 -1
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/src/rda_python_common/PgFile.py +14 -2
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/src/rda_python_common.egg-info/PKG-INFO +1 -1
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/LICENSE +0 -0
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/README.md +0 -0
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/setup.cfg +0 -0
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/src/rda_python_common/PgCMD.py +0 -0
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/src/rda_python_common/PgDBI.py +0 -0
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/src/rda_python_common/PgLOG.py +0 -0
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/src/rda_python_common/PgLock.py +0 -0
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/src/rda_python_common/PgOPT.py +0 -0
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/src/rda_python_common/PgSIG.py +0 -0
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/src/rda_python_common/PgSplit.py +0 -0
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/src/rda_python_common/PgUtil.py +0 -0
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/src/rda_python_common/__init__.py +0 -0
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/src/rda_python_common.egg-info/SOURCES.txt +0 -0
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/src/rda_python_common.egg-info/dependency_links.txt +0 -0
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/src/rda_python_common.egg-info/requires.txt +0 -0
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/src/rda_python_common.egg-info/top_level.txt +0 -0
- {rda_python_common-1.0.42 → rda_python_common-1.0.43}/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.43
|
|
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
|
|
@@ -1636,7 +1636,7 @@ def local_file_stat(file, fstat, opt, logact):
|
|
|
1636
1636
|
|
|
1637
1637
|
info = {}
|
|
1638
1638
|
info['isfile'] = (1 if stat.S_ISREG(fstat.st_mode) else 0)
|
|
1639
|
-
info['data_size'] = fstat.st_size
|
|
1639
|
+
info['data_size'] = fstat.st_size if info['isfile'] else local_path_size(file)
|
|
1640
1640
|
info['fname'] = op.basename(file)
|
|
1641
1641
|
if not opt: return info
|
|
1642
1642
|
if opt&64 and info['isfile'] and info['data_size'] < PgLOG.PGLOG['MINSIZE']:
|
|
@@ -1665,6 +1665,18 @@ def local_file_stat(file, fstat, opt, logact):
|
|
|
1665
1665
|
|
|
1666
1666
|
return info
|
|
1667
1667
|
|
|
1668
|
+
#
|
|
1669
|
+
# get total size of files under a given path
|
|
1670
|
+
#
|
|
1671
|
+
def local_path_size(pname):
|
|
1672
|
+
|
|
1673
|
+
if not pname: pname = '.' # To get size of current directory
|
|
1674
|
+
size = 0
|
|
1675
|
+
for path, dirs, files in os.walk(pname):
|
|
1676
|
+
for f in files:
|
|
1677
|
+
size += os.path.getsize(os.path.join(path, f))
|
|
1678
|
+
return size
|
|
1679
|
+
|
|
1668
1680
|
#
|
|
1669
1681
|
# check and get file status information of a file on remote host
|
|
1670
1682
|
#
|
|
@@ -2557,7 +2569,7 @@ def rda_file_size(file, host, opt = 0, logact = 0):
|
|
|
2557
2569
|
#
|
|
2558
2570
|
def local_file_size(file, opt = 0, logact = 0):
|
|
2559
2571
|
|
|
2560
|
-
if not op.
|
|
2572
|
+
if not op.exists(file):
|
|
2561
2573
|
if opt&4: lmsg(file, PgLOG.PGLOG['MISSFILE'], logact)
|
|
2562
2574
|
return -1 # file not eixsts
|
|
2563
2575
|
|
{rda_python_common-1.0.42 → rda_python_common-1.0.43}/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.43
|
|
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.42 → rda_python_common-1.0.43}/src/rda_python_common.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{rda_python_common-1.0.42 → rda_python_common-1.0.43}/src/rda_python_common.egg-info/requires.txt
RENAMED
|
File without changes
|
{rda_python_common-1.0.42 → rda_python_common-1.0.43}/src/rda_python_common.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|