Skip to content

Commit 46961b3

Browse files
authored
Merge branch 'master' into add-choices-list-parameter
2 parents 0e3fcdc + c9a0d20 commit 46961b3

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

luigi/__meta__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
__author__ = 'The Luigi Authors'
88
__contact__ = 'https://github.com/spotify/luigi'
99
__license__ = 'Apache License 2.0'
10-
__version__ = '3.5.1'
10+
__version__ = '3.5.2'
1111
__status__ = 'Production'

luigi/contrib/lsf.py

100755100644
+2-2
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ def track_job(job_id):
8181
- "EXIT"
8282
based on the LSF documentation
8383
"""
84-
cmd = "bjobs -noheader -o stat {}".format(job_id)
84+
cmd = ["bjobs", "-noheader", "-o", "stat", str(job_id)]
8585
track_job_proc = subprocess.Popen(
86-
cmd, stdout=subprocess.PIPE, shell=True)
86+
cmd, stdout=subprocess.PIPE, shell=False)
8787
status = track_job_proc.communicate()[0].strip('\n')
8888
return status
8989

luigi/contrib/pai.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def __init_token(self):
239239

240240
request_json = json.dumps({'username': self.__openpai.username, 'password': self.__openpai.password,
241241
'expiration': self.__openpai.expiration})
242-
logger.debug('Get token request {0}'.format(request_json))
242+
logger.debug('Requesting token from OpenPai')
243243
response = rs.post(urljoin(self.__openpai.pai_url, '/api/v1/token'),
244244
headers={'Content-Type': 'application/json'}, data=request_json)
245245
logger.debug('Get token response {0}'.format(response.text))

luigi/lock.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def acquire_for(pid_dir, num_available=1, kill_signal=None):
100100
# Create a pid file if it does not exist
101101
try:
102102
os.mkdir(pid_dir)
103-
os.chmod(pid_dir, 0o777)
103+
os.chmod(pid_dir, 0o700)
104104
except OSError as exc:
105105
if exc.errno != errno.EEXIST:
106106
raise

test/lock_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def test_acquiring_partially_taken_lock(self):
100100
self.assertTrue(acquired)
101101

102102
s = os.stat(self.pid_file)
103-
self.assertEqual(s.st_mode & 0o777, 0o777)
103+
self.assertEqual(s.st_mode & 0o700, 0o700)
104104

105105
def test_acquiring_lock_from_missing_process(self):
106106
fake_pid = 99999
@@ -111,7 +111,7 @@ def test_acquiring_lock_from_missing_process(self):
111111
self.assertTrue(acquired)
112112

113113
s = os.stat(self.pid_file)
114-
self.assertEqual(s.st_mode & 0o777, 0o777)
114+
self.assertEqual(s.st_mode & 0o700, 0o700)
115115

116116
@mock.patch('os.kill')
117117
def test_take_lock_with_kill(self, kill_fn):

0 commit comments

Comments
 (0)