forum.vmspython.org Forum Index forum.vmspython.org
Forum system
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

vms.starlet.get_security not working on version 2.7.8

 
Post new topic   Reply to topic    forum.vmspython.org Forum Index -> Python for OpenVMS
View previous topic :: View next topic  
Author Message
dlaroche-ca



Joined: 03 Jul 2013
Posts: 32
Location: Montréal, Québec, Canada

PostPosted: Fri Oct 17, 2014 9:23 pm    Post subject: vms.starlet.get_security not working on version 2.7.8 Reply with quote

I found another thing not working with the new version:
Code:

from vms.ossdef import OSS__PROTECTION
from vms.starlet import get_security
from vms.itemList import itemList, il_noType
itl = [itemList(code=OSS__PROTECTION, dtype=il_noType)]

status, ctx, resdic = get_security('FILE', objnam='tfc$user:[ex36672]login.com', itmlst=itl)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: need more than 2 values to unpack


The same example works fine on version 2.7.2+. This is for VMS 8.3 on an Integrity server.

Thanks in advance.
Back to top
View user's profile Send private message Send e-mail
jfp



Joined: 12 Jul 2004
Posts: 618

PostPosted: Sun Oct 19, 2014 9:01 am    Post subject: Reply with quote

Correct,

in the new interface when there is no context the result doesn't include it.

So get_security only returns status and resdic.
But if you call it with "contxt=0" the results include the updated context.

I will take a look to add some flag to keep the compatibility with previous version.

JF
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dlaroche-ca



Joined: 03 Jul 2013
Posts: 32
Location: Montréal, Québec, Canada

PostPosted: Tue Oct 21, 2014 2:32 pm    Post subject: Reply with quote

Ok thanks. I will revise all the calls I make to vms.starlet functions to add the ctx argument. Please don't spend too much time to make it backward compatible just for me.
Back to top
View user's profile Send private message Send e-mail
jfp



Joined: 12 Jul 2004
Posts: 618

PostPosted: Tue Oct 21, 2014 4:41 pm    Post subject: Reply with quote

I think it's better to remove the ctxt result, adding a non null context may result in memory leak (at least for some system services).
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vmspython.org Forum Index -> Python for OpenVMS All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group