Skip to content

Commit 16468e1

Browse files
author
efajardo
committed
Only checking the ownership
1 parent ae10ae6 commit 16468e1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

osgtest/library/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,8 +651,8 @@ def check_file_and_perms(file_path, owner_name, permissions):
651651
'owner_name', is a file, and has the given permissions; False otherwise
652652
"""
653653
file_stat = os.stat(file_path)
654-
return check_file_ownership(file_path, owner_name) and
655-
file_stat.st_mode & 0o7777 == permissions
654+
return (check_file_ownership(file_path, owner_name) and
655+
file_stat.st_mode & 0o7777 == permissions)
656656

657657
def parse_env_output(output):
658658
"""

osgtest/tests/test_450_xrootd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def test_02_test_multiuser(self):
4848
temp_dir = "/tmp/vdttest"
4949
if core.config['xrootd.multiuser'] == "ON":
5050
file_path = os.path.join(temp_dir, 'copied_file.txt')
51-
result_perm = core.check_file_and_perms(file_path, core.options.username, 0o777)
51+
result_perm = core.check_file_ownership(file_path, core.options.username)
5252
#owner_uid = pwd.getpwnam(core.options.username)
5353
#file_stat = os.stat(file_path)
5454
self.assertEqual(result_perm, True)

0 commit comments

Comments
 (0)