rda-python-common 2.1.3__py3-none-any.whl → 2.1.5__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.
@@ -2994,8 +2994,8 @@ class PgFile(PgUtil, PgSIG):
2994
2994
  logact = lact = self.LOGWRN
2995
2995
  lvl = self.DIRLVLS
2996
2996
  self.DIRLVLS = 0 # set to 0 to stop recording directory
2997
- while lvl > 0:
2998
- lvl -= 1
2997
+ while lvl != 0:
2998
+ if lvl > 0: lvl -= 1
2999
2999
  dirs = {}
3000
3000
  for dir in self.DELDIRS:
3001
3001
  host = self.DELDIRS[dir]
@@ -3007,7 +3007,8 @@ class PgFile(PgUtil, PgSIG):
3007
3007
  elif dstat > 0:
3008
3008
  if dstat == 1 and lvl > 0: self.pglog(dinfo + ": Directory not empty yet", lact)
3009
3009
  continue
3010
- if lvl: dirs[op.dirname(dir)] = host
3010
+ pdir = self.dirname(dir)
3011
+ if lvl and pdir and not re.match(r'^(\.|\./|/)$', pdir): dirs[pdir] = host
3011
3012
  if not dirs: break
3012
3013
  self.DELDIRS = dirs
3013
3014
  self.DELDIRS = {} # empty cache afterward
@@ -199,9 +199,8 @@ class PgLOG:
199
199
  except Exception as e:
200
200
  self.pglog("{}: Error open file to write - {}".format(outfile, str(e)), self.PGOPT['extlog'])
201
201
  else: # result to STDOUT
202
- if self.OUTPUT and self.OUTPUT != sys.stdout:
203
- self.OUTPUT.close()
204
- self.OUTPUT = sys.stdout
202
+ if self.OUTPUT and self.OUTPUT != sys.stdout: self.OUTPUT.close()
203
+ self.OUTPUT = sys.stdout
205
204
 
206
205
  def current_datetime(self, ctime=0):
207
206
  """Return a datetime string in YYYYMMDDHHMMSS format.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_common
3
- Version: 2.1.3
3
+ Version: 2.1.5
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
@@ -10,18 +10,18 @@ rda_python_common/PgUtil.py,sha256=OqESKCd72b9g8m8jwjPJhXDtPYlW6G8oSOhwChvz2Cg,4
10
10
  rda_python_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  rda_python_common/pg_cmd.py,sha256=hQZaW80eFqEUoF0vZHtGuvBEWXbXdY0Nvj6rFIQGboo,32856
12
12
  rda_python_common/pg_dbi.py,sha256=R-ZzHUItAxma_rCTrelDakFQDl8yEtOTKo4IRfzKl_Q,116269
13
- rda_python_common/pg_file.py,sha256=Gz0R1wISIMHr7UBPGqeK6eJlLCjwQcP_V6n65WxjTEM,161927
13
+ rda_python_common/pg_file.py,sha256=gNhUjT39g6RMUel1Z4suxFrQtstQr8emNxI-NphKyOE,162015
14
14
  rda_python_common/pg_lock.py,sha256=Il-pY81JtEDMWtwqW6lEM-EtKbhNI6rug8VMCdkGgNc,32703
15
- rda_python_common/pg_log.py,sha256=0QSfyPh7eQCeRqXIr2JyuzYgqvrz02-mQmWB-6rWukg,80676
15
+ rda_python_common/pg_log.py,sha256=Zte9joy46hn2RsJPNpisHLjxZI-mDdcXY4aSiMNlIoY,80661
16
16
  rda_python_common/pg_opt.py,sha256=N45DIY2O3S7ogABOHUecfiKwQY1_O4X7WYYZGLdnhOI,82506
17
17
  rda_python_common/pg_password.py,sha256=X-eIDwdqBhtrhrbDTNWle-0JtWsyIVZdDOZaBu7cFHM,2343
18
18
  rda_python_common/pg_sig.py,sha256=Dz7QKOkwYchbhVZgQxQqFrUmGaxer2bm8D2K99ig5L0,52760
19
19
  rda_python_common/pg_split.py,sha256=yOeUSRzgQlwNGzv76ZLCZtsjzDQw0NeYXz0IV0RZgXQ,16343
20
20
  rda_python_common/pg_util.py,sha256=1f25D4xyPMerW55q42CQOD0WYAoFYL2A8Opl4rHA8N4,87393
21
21
  rda_python_common/pgpassword.py,sha256=WXEq88XgkQSmJ2j2MX0HSVEUFZOFu-gokRJYvEQj_u4,2900
22
- rda_python_common-2.1.3.dist-info/licenses/LICENSE,sha256=1dck4EAQwv8QweDWCXDx-4Or0S8YwiCstaso_H57Pno,1097
23
- rda_python_common-2.1.3.dist-info/METADATA,sha256=W-ysLsTr3KWxJMAUIYSbCKnbin9Erq_JVIYas0C---E,740
24
- rda_python_common-2.1.3.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
25
- rda_python_common-2.1.3.dist-info/entry_points.txt,sha256=pZgVNWspcK-F1TbPav7C3C9NdeHDZMm_25fW9weix00,65
26
- rda_python_common-2.1.3.dist-info/top_level.txt,sha256=KVQmx7D3DD-jsiheqL8HdTrRE14hpRnZY5_ioMArA5k,18
27
- rda_python_common-2.1.3.dist-info/RECORD,,
22
+ rda_python_common-2.1.5.dist-info/licenses/LICENSE,sha256=1dck4EAQwv8QweDWCXDx-4Or0S8YwiCstaso_H57Pno,1097
23
+ rda_python_common-2.1.5.dist-info/METADATA,sha256=o-rx2hJHMzPUTijfw5XylM5OkWJYVqbyiOFbMA4AVJw,740
24
+ rda_python_common-2.1.5.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
25
+ rda_python_common-2.1.5.dist-info/entry_points.txt,sha256=pZgVNWspcK-F1TbPav7C3C9NdeHDZMm_25fW9weix00,65
26
+ rda_python_common-2.1.5.dist-info/top_level.txt,sha256=KVQmx7D3DD-jsiheqL8HdTrRE14hpRnZY5_ioMArA5k,18
27
+ rda_python_common-2.1.5.dist-info/RECORD,,