casaconfig 0.0.60__tar.gz → 0.0.62__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.
- {casaconfig-0.0.60/casaconfig.egg-info → casaconfig-0.0.62}/PKG-INFO +1 -1
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/private/get_data_lock.py +6 -12
- {casaconfig-0.0.60 → casaconfig-0.0.62/casaconfig.egg-info}/PKG-INFO +1 -1
- {casaconfig-0.0.60 → casaconfig-0.0.62}/setup.py +1 -1
- {casaconfig-0.0.60 → casaconfig-0.0.62}/LICENSE +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/MANIFEST.in +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/README.md +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/__data__/README.txt +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/__init__.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/__main__.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/config.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/private/__init__.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/private/casasiteconfig.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/private/config_defaults.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/private/config_defaults_static.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/private/data_available.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/private/data_update.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/private/do_pull_data.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/private/get_argparser.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/private/get_config.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/private/io_redirect.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/private/measures_available.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/private/measures_update.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/private/print_log_messages.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/private/pull_data.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig/private/set_casacore_path.py +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig.egg-info/SOURCES.txt +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig.egg-info/dependency_links.txt +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig.egg-info/requires.txt +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/casaconfig.egg-info/top_level.txt +0 -0
- {casaconfig-0.0.60 → casaconfig-0.0.62}/setup.cfg +0 -0
@@ -39,6 +39,7 @@ def get_data_lock(path, fn_name):
|
|
39
39
|
|
40
40
|
import fcntl
|
41
41
|
import os
|
42
|
+
import getpass
|
42
43
|
from datetime import datetime
|
43
44
|
|
44
45
|
if not os.path.exists(path): return None
|
@@ -61,24 +62,17 @@ def get_data_lock(path, fn_name):
|
|
61
62
|
|
62
63
|
# write the lock information, the seek and truncate are probably not necessary
|
63
64
|
try:
|
64
|
-
print("lock file fd obtained for %s" % lock_path)
|
65
65
|
lock_fd.seek(0)
|
66
|
-
print("seek")
|
67
66
|
lock_fd.truncate(0)
|
68
|
-
|
69
|
-
print("writing lock information")
|
70
|
-
print("fn_name : %s" % fn_name)
|
71
|
-
print("os.getlogin() : %s" % os.getlogin())
|
72
|
-
print("os.uname().nodename : %s" % os.uname().nodename)
|
73
|
-
print("os.getpid() : %s" % os.getpid())
|
74
|
-
print("datetime.today : %s" % datetime.today().strftime('%Y-%m-%d:%H:%M:%S'))
|
75
|
-
lock_fd.write("locked using %s by %s on %s : pid = %s at %s" % (fn_name, os.getlogin(), os.uname().nodename, os.getpid(), datetime.today().strftime('%Y-%m-%d:%H:%M:%S')))
|
76
|
-
print("info written")
|
67
|
+
lock_fd.write("locked using %s by %s on %s : pid = %s at %s" % (fn_name, getpass.getuser(), os.uname().nodename, os.getpid(), datetime.today().strftime('%Y-%m-%d:%H:%M:%S')))
|
77
68
|
lock_fd.flush()
|
78
|
-
print("lock_fd flushed")
|
79
69
|
except:
|
70
|
+
print("Unexpected failure in writing lock information to lock file %s" % lock_path)
|
71
|
+
print("Called by function : %s" % fn_name)
|
80
72
|
import traceback
|
81
73
|
traceback.print_exc()
|
74
|
+
lock_fd.close()
|
75
|
+
return None
|
82
76
|
|
83
77
|
return lock_fd
|
84
78
|
|
@@ -6,7 +6,7 @@ with open('README.md', "r") as fid: #encoding='utf-8'
|
|
6
6
|
|
7
7
|
setup(
|
8
8
|
name='casaconfig',
|
9
|
-
version='0.0.
|
9
|
+
version='0.0.62',
|
10
10
|
description='CASA Operational Configuration Package',
|
11
11
|
long_description=long_description,
|
12
12
|
long_description_content_type="text/markdown",
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|