Skip to content

Commit a746e2a

Browse files
committed
correct __lt__ comparison function
1 parent d419d0e commit a746e2a

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

irods/access.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,16 @@ def __init__(self, access_name, path, user_name="", user_zone="", user_type=None
9393

9494
def __lt__(self, other):
9595
return (
96-
self.access_name < other.access_name
97-
and self.user_name < other.user_name
98-
and self.user_zone < other.user_zone
99-
) and iRODSPath(self.path) < iRODSPath(other.path)
96+
self.access_name,
97+
self.user_name,
98+
self.user_zone,
99+
iRODSPath(self.path)
100+
) < (
101+
other.access_name,
102+
other.user_name,
103+
other.user_zone,
104+
iRODSPath(other.path)
105+
)
100106

101107
def __eq__(self, other):
102108
return (

0 commit comments

Comments
 (0)