Skip to content

Commit

Permalink
fix for py27 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
jreadey committed Aug 2, 2018
1 parent 943fce4 commit 3cd8246
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion h5pyd/_apps/hsacl.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,12 @@ def main():
'readACL': False,
'userName': 'default'
}
update_names = usernames.copy()
# note: list.copy not supported in py2.7, copy by hand for now
# update_names = usernames.copy()
update_names = []
for username in usernames:
update_names.append(username)

if not update_names:
update_names.append("default")

Expand Down
2 changes: 1 addition & 1 deletion test/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def test_auth(self):
# no explicit ACLs yet
file_acls = f.getACLs()
if is_hsds:
self.assertTrue(len(file_acls) >= 2) # Should have at least the acls - "default" and test_user1
self.assertTrue(len(file_acls) >= 1) # Should have at least the test_user1 acl
else:
self.assertEqual(len(file_acls), 0)

Expand Down

0 comments on commit 3cd8246

Please sign in to comment.