Here is the problem:
the settings class allows to lock keys to prevent users from
mispelling settings. the rpx module need to be modified in the
following way
class RPXAuth(Auth):
def __init__(....):
self.settings.lock_keys=False ### insert this
## current code for __init__
self.settings.lock_keys=True ### insert this
this will allow to define the new settings. Replacing = with == is not
a solution since it will prevent it from working properly.
On 15 Lug, 03:47, ChrisM <[email protected]> wrote:
> I have kind of got it working again by changing = to == in all
> self.settings in rpx module.
> Is this change in storage.py / restricted.py documented anywhere or
> explaination
> of why i needed to do this would be great.
> chrism
>
> On Jul 14, 10:14 am, ChrisM <[email protected]> wrote:
>
> > Hi is anyone else using niels rpxauth.py module, it appears to throw
> > an error
> > with recent releases of web2py.
> > It seems there is a problem with the storage.py which does not like
> > the way rpxauth.py defines the settings.rpx_key and it no longer
> > works?
> > works fine in web2py 1.76.2 not test later versions yet.
> > Here is the traceback:
> > Error traceback
> > Traceback (most recent call last):
> > File "C:\APPS\augmi\gluon\restricted.py", line 178, in restricted
> > exec ccode in environment
> > File "C:/APPS/augmi/applications/init/models/db.py", line 33, in
> > <module>
> > auth=RPXAuth(globals(),db) # authentication/
> > authorization
> > File "C:\APPS\augmi\applications\init\modules\rpxauth.py", line 86,
> > in __init__
> > self.settings.rpx_keyy = ''
> > File "C:\APPS\augmi\gluon\storage.py", line 105, in __setattr__
> > raise SyntaxError, 'setting key \'%s\' does not exist' % key
> > SyntaxError: setting key 'rpx_keyy' does not exist
>
> > I tried fixing bug, but no luck as yet, any ideas/pointers or help
> > appreciated.
>
> > Regards
> > chris