[Moin-user] Trying to understand notification behaviour in PageEdit.py

Philip Colmer philip.colmer at linaro.org
Tue Feb 24 10:51:37 EST 2015

I've got a nightly script that does a lot of automated changes to pages and
I need to stop the notifications going out because of the email overhead it
is generating.

Looking at the code for PageEditor.py, I can see that saveText accepts the
keyword notify:

@keyword notify: if False (default: True), don't send a PageChangedEvent

Indeed, there are calls to saveText within PageEditor.py where notify=False
is set in the call.

However, similarly changing my code so that it sets notify to False does
not have the same effect.

editor.saveText(text, 0, notify=False) still results in a notification
being sent. What is *really* weird is that if I edit the saveText code so
that the default value for notify is changed, thus:

notify = kw.get('notify', False)

I *still* get the notification when my script runs, but if I edit a page
manually, NO notifications are sent.

I've only got one file on my server called PageEditor.py so I am really
bemused as to what the heck is going on here. I've trying adding logging to
the code and, again, the logging only happens when I'm using moin via the
web server. Nothing is output when my script runs.

Any suggestions, please?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/moin-user/attachments/20150224/d80c447c/attachment.html>

More information about the Moin-user mailing list