rda-python-common 1.0.15__py3-none-any.whl → 1.0.17__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.
Potentially problematic release.
This version of rda-python-common might be problematic. Click here for more details.
- rda_python_common/PgDBI.py +0 -5
- rda_python_common/PgFile.py +2 -1
- rda_python_common/PgLOG.py +10 -3
- {rda_python_common-1.0.15.dist-info → rda_python_common-1.0.17.dist-info}/METADATA +1 -1
- {rda_python_common-1.0.15.dist-info → rda_python_common-1.0.17.dist-info}/RECORD +8 -8
- {rda_python_common-1.0.15.dist-info → rda_python_common-1.0.17.dist-info}/WHEEL +0 -0
- {rda_python_common-1.0.15.dist-info → rda_python_common-1.0.17.dist-info}/licenses/LICENSE +0 -0
- {rda_python_common-1.0.15.dist-info → rda_python_common-1.0.17.dist-info}/top_level.txt +0 -0
rda_python_common/PgDBI.py
CHANGED
|
@@ -236,7 +236,6 @@ def set_dbname(scname = None, lnname = None, pwname = None, dbhost = None, dbpor
|
|
|
236
236
|
#
|
|
237
237
|
def set_scname(dbname = None, scname = None, lnname = None, pwname = None, dbhost = None, dbport = None, socket = None):
|
|
238
238
|
|
|
239
|
-
global pgdb
|
|
240
239
|
changed = 0
|
|
241
240
|
|
|
242
241
|
if dbname and dbname != PGDBI['DBNAME']:
|
|
@@ -274,7 +273,6 @@ def set_scname(dbname = None, scname = None, lnname = None, pwname = None, dbhos
|
|
|
274
273
|
def starttran():
|
|
275
274
|
|
|
276
275
|
global curtran
|
|
277
|
-
global pgdb
|
|
278
276
|
|
|
279
277
|
if curtran == 1: endtran() # try to end previous transaction
|
|
280
278
|
if not pgdb:
|
|
@@ -296,7 +294,6 @@ def starttran():
|
|
|
296
294
|
def endtran(autocommit = True):
|
|
297
295
|
|
|
298
296
|
global curtran
|
|
299
|
-
global pgdb
|
|
300
297
|
if curtran and pgdb:
|
|
301
298
|
if not pgdb.closed: pgdb.commit()
|
|
302
299
|
pgdb.autocommit = autocommit
|
|
@@ -308,7 +305,6 @@ def endtran(autocommit = True):
|
|
|
308
305
|
def aborttran(autocommit = True):
|
|
309
306
|
|
|
310
307
|
global curtran
|
|
311
|
-
global pgdb
|
|
312
308
|
if curtran and pgdb:
|
|
313
309
|
if not pgdb.closed: pgdb.rollback()
|
|
314
310
|
pgdb.autocommit = autocommit
|
|
@@ -535,7 +531,6 @@ def pgconnect(reconnect = 0, pgcnt = 0, autocommit = True):
|
|
|
535
531
|
#
|
|
536
532
|
def pgcursor():
|
|
537
533
|
|
|
538
|
-
global pgdb
|
|
539
534
|
pgcur = None
|
|
540
535
|
|
|
541
536
|
if not pgdb:
|
rda_python_common/PgFile.py
CHANGED
|
@@ -1125,7 +1125,8 @@ def make_one_remote_directory(dir, odir, host, logact = 0):
|
|
|
1125
1125
|
if is_root_directory(dir, 'R', host, "make directory {} on {}".format(odir, host), logact): return PgLOG.FAILURE
|
|
1126
1126
|
|
|
1127
1127
|
if make_one_remote_directory(op.dirname(dir), odir, host, logact):
|
|
1128
|
-
|
|
1128
|
+
tmpsync = PgLOG.get_tmpsync_path()
|
|
1129
|
+
if PgLOG.pgsystem("{} {} {}".format(PgLOG.get_sync_command(host), tmpsync, dir), logact, 5):
|
|
1129
1130
|
set_remote_mode(dir, 0, host, PgLOG.PGLOG['EXECMODE'])
|
|
1130
1131
|
return PgLOG.SUCCESS
|
|
1131
1132
|
|
rda_python_common/PgLOG.py
CHANGED
|
@@ -564,7 +564,7 @@ def set_help_path(progfile):
|
|
|
564
564
|
#
|
|
565
565
|
def show_usage(progname, opts = None):
|
|
566
566
|
|
|
567
|
-
if PGLOG['PUSGDIR'] is None: set_help_path(get_caller_file())
|
|
567
|
+
if PGLOG['PUSGDIR'] is None: set_help_path(get_caller_file(1))
|
|
568
568
|
usgname = join_paths(PGLOG['PUSGDIR'], progname + '.usg')
|
|
569
569
|
|
|
570
570
|
if opts:
|
|
@@ -1337,11 +1337,18 @@ def set_common_pglog():
|
|
|
1337
1337
|
|
|
1338
1338
|
# empty diretory for HOST-sync
|
|
1339
1339
|
PGLOG['TMPSYNC'] = PGLOG['DSSDBHM'] + "/tmp/.syncdir"
|
|
1340
|
+
|
|
1341
|
+
os.umask(2)
|
|
1342
|
+
|
|
1343
|
+
#
|
|
1344
|
+
# check and return TMPSYNC path, and add it if not exists
|
|
1345
|
+
#
|
|
1346
|
+
def get_tmpsync_path():
|
|
1347
|
+
|
|
1340
1348
|
if 'DSSHOME' in PGLOG and PGLOG['DSSHOME'] and not op.exists(PGLOG['TMPSYNC']):
|
|
1341
1349
|
pgsystem("mkdir " + PGLOG['TMPSYNC'], 0, LGWNEX, 4)
|
|
1342
1350
|
pgsystem("chmod 775 " + PGLOG['TMPSYNC'], LOGWRN, 4)
|
|
1343
|
-
|
|
1344
|
-
os.umask(2)
|
|
1351
|
+
return PGLOG['TMPSYNC']
|
|
1345
1352
|
|
|
1346
1353
|
#
|
|
1347
1354
|
# append or prepend locpath to pgpath
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rda_python_common
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.17
|
|
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
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
rda_python_common/PgCMD.py,sha256=dsFL_hiAHRZ-BwncgZhxQ7p9O10ox9lUSXOIePjZ-PQ,20487
|
|
2
|
-
rda_python_common/PgDBI.py,sha256=
|
|
3
|
-
rda_python_common/PgFile.py,sha256=
|
|
4
|
-
rda_python_common/PgLOG.py,sha256=
|
|
2
|
+
rda_python_common/PgDBI.py,sha256=iGy0SQZsdVbSz2ewTIUK3e-RQBC5eQM9-_XUcFU1c50,74211
|
|
3
|
+
rda_python_common/PgFile.py,sha256=nCZcSYdKaa1okVVEvj1Wx6OUbYNAbPWYedoCNvqevQU,98405
|
|
4
|
+
rda_python_common/PgLOG.py,sha256=ZbXbOshjGwqYxpUAqTZqkViOBEZ_zVZF_t2SZ_q_AJg,54149
|
|
5
5
|
rda_python_common/PgLock.py,sha256=12i84nsGBuifSyPnm8IR63LvHvRuVU573D5QKFlHdOI,22623
|
|
6
6
|
rda_python_common/PgOPT.py,sha256=BAfuNi_1jEK-UyYVfPY_0f4b7KLhpcFM3BDShLRvT7w,55446
|
|
7
7
|
rda_python_common/PgSIG.py,sha256=oDXcSnnzW6wKm_cSpFxQZWAo2hpPPTcuNDYhPSNQcRc,35607
|
|
8
8
|
rda_python_common/PgSplit.py,sha256=QKPbF55m8KCTGmwVwL3uG_nuylCC4FSVfLuXeLjJHbE,8816
|
|
9
9
|
rda_python_common/PgUtil.py,sha256=OpkNDwt694ebttNNUEDrrtDKyITZkx8g3uAI3b_FF4c,48737
|
|
10
10
|
rda_python_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
rda_python_common-1.0.
|
|
12
|
-
rda_python_common-1.0.
|
|
13
|
-
rda_python_common-1.0.
|
|
14
|
-
rda_python_common-1.0.
|
|
15
|
-
rda_python_common-1.0.
|
|
11
|
+
rda_python_common-1.0.17.dist-info/licenses/LICENSE,sha256=1dck4EAQwv8QweDWCXDx-4Or0S8YwiCstaso_H57Pno,1097
|
|
12
|
+
rda_python_common-1.0.17.dist-info/METADATA,sha256=JOGDLYq0Z3xG0w-JTzBzmHg0WJCmIN0PBTd1DD8ZkuI,652
|
|
13
|
+
rda_python_common-1.0.17.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
14
|
+
rda_python_common-1.0.17.dist-info/top_level.txt,sha256=KVQmx7D3DD-jsiheqL8HdTrRE14hpRnZY5_ioMArA5k,18
|
|
15
|
+
rda_python_common-1.0.17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|