Skip to content

Commit 6921fa8

Browse files
committed
minor updates/corrections
1 parent 8a656a0 commit 6921fa8

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

irods/access.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def copy(self, decanonicalize=False, implied_zone=''):
127127
}.get(self.access_name)
128128
other.access_name = replacement_string if replacement_string is not None else self.access_name
129129

130-
# Useful if we wish to force an explicitly specified local zone to null length for equality testing:
130+
# Useful if we wish to force an explicitly specified local zone to an implicit zone spec in the copy, for equality testing:
131131
if '' != implied_zone == other.user_zone:
132132
other.user_zone = ''
133133

@@ -173,9 +173,7 @@ def __lt__(self, other):
173173
)
174174

175175
def __repr__(self):
176-
return f"<ACLOperation: access_name={self.access_name!r} "\
177-
f"user_name={self.user_name!r} "\
178-
f"user_zone={self.user_zone!r}>"
176+
return f"<ACLOperation {self.access_name} {self.user_name} {self.user_zone}>"
179177

180178
class _iRODSAccess_pre_4_3_0(iRODSAccess):
181179
codes = collections.OrderedDict(

irods/manager/access_manager.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def users_by_ids(session, ids=()):
3838

3939
class AccessManager(Manager):
4040

41-
def _ACL_operation(self, op_input: iRODSAccess):
41+
@staticmethod
42+
def _to_acl_operation_json(op_input: iRODSAccess):
4243
return {
4344
"acl": op_input.access_name,
4445
"entity_name": op_input.user_name,
@@ -52,7 +53,7 @@ def apply_atomic_acl_operations(self, logical_path : str, *operations, admin=Fal
5253
request_text = {
5354
"logical_path": logical_path,
5455
"admin_mode": admin,
55-
"operations": [self._ACL_operation(op) for op in operations]
56+
"operations": [self._to_acl_operation_json(op) for op in operations]
5657
}
5758

5859
with self.sess.pool.get_connection() as conn:

0 commit comments

Comments
 (0)