LuKreme wrote:

>I made some changes to a .py file and then restarted mailman with
>
>/usr/local/mailman/bin/mailmanctl restart
>
>however, the .pyc file did not get updated as its timestamp didn't change:
>
># ls -lshtr Mailman/Handlers/Spam*    
> 6 -rw-r--r--  1 root  mailman   4.4K Apr 24  2010 
> Mailman/Handlers/SpamDetect.pyc
> 6 -rw-r--r--  1 root  mailman   4.9K May  4 08:58 
> Mailman/Handlers/SpamDetect.py
>
>the change was simple, just added some text to the Errors.RejectMessage
>
>(Mailman-2.1.12)
>
>So, it looks like mm_cfg.py is the only .py that gets recompiled 
>automatically, right? So how do I recompile SpamDetect.py after making my 
>changes?


When Python imports a module and the module's .py file is newer than
the .pyc, it will read the .py, compile it and if it can, write the
.pyc.

The problem here is permissions. By the time the qrunners are importing
anything, they are running as user:group mailman:mailman, and neither
the user nor the group has permission to write
Mailman/Handlers/SpamDetect.pyc. This is OK in general, but will lead
to your particular issue. If you

chown mailman Mailman/Handlers/SpamDetect.pyc

(or maybe even 'chown -R mailman Mailman'), and then restart Mailman,
SpamDetect.pyc will be updated.

-- 
Mark Sapiro <m...@msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

------------------------------------------------------
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to