Python iRODS Client (PRC) - getting the permissions - why three times the expected output?

15 views
Skip to first unread message

Bazi Jana

unread,
May 21, 2024, 10:33:36 AMMay 21
to iRODS-Chat
Hi,

$ nano testgui.py
import os
import sys
from irods.session import iRODSSession
from irods.access import iRODSAccess
import ssl

ssl_context = ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH, cafile=None, capath=None, cadata=None)

ssl_settings =  {
  "irods_authentication_scheme": "pam_password",
  "irods_client_server_negotiation": "request_server_negotiation",
  "irods_client_server_policy": "CS_NEG_REQUIRE",
  "irods_encryption_key_size": 32,
  "irods_encryption_salt_size": 8,
  "irods_encryption_num_hash_rounds": 16,
  "irods_encryption_algorithm": "AES-256-CBC",
  "ssl_context": ssl_context
  }
...

with iRODSSession(XXX, **ssl_settings) as session:
       file = session.data_objects.get('/testZone/home/alice/sourceColl/testhell.txt')
       print(session.acls.get(file))


$ python3  testgui.py
Output:
[<iRODSAccess own /testZone/home/alice/sourceColl/testhell.txt alice(rodsuser) testZone>, <iRODSAccess own /testZone/home/alice/sourceColl/testhell.txt alice(rodsuser) testZone>, <iRODSAccess own /testZone/home/alice/sourceColl/testhell.txt alice(rodsuser) testZone>]


I wonder why I' m getting three times the expected output (the red one) instead of [<iRODSAccess own /testZone/home/alice/sourceColl/testhell.txt alice(rodsuser) testZone>] ? How could I correct this?

Alan King

unread,
May 21, 2024, 10:42:09 AMMay 21
to irod...@googlegroups.com
Hi,

I believe that you are seeing this issue: https://github.com/irods/python-irodsclient/issues/557

There is an in-progress fix here which will be included in 2.1.0: https://github.com/irods/python-irodsclient/pull/559

As a workaround, you could examine the items in the list and discard duplicates.

--
--
The Integrated Rule-Oriented Data System (iRODS) - https://irods.org
 
iROD-Chat: http://groups.google.com/group/iROD-Chat
---
You received this message because you are subscribed to the Google Groups "iRODS-Chat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to irod-chat+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/irod-chat/54b9f291-d137-4c4a-aa73-471581081582n%40googlegroups.com.


--
Alan King
Senior Software Developer | iRODS Consortium
Reply all
Reply to author
Forward
0 new messages