[Mailman-Users] .py and .pyc files

2011-05-04 Thread LuKreme
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?

-- 
http://img.ly/system/uploads/000/780/083/large_IMG_0710.PNG?1300988642

--
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


Re: [Mailman-Users] .py and .pyc files

2011-05-04 Thread Mark Sapiro
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.netThe highway is for gamblers,
San Francisco Bay Area, Californiabetter 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


[Mailman-Users] how to rebuils site-wide mailman list

2011-05-04 Thread Carlos R. Pasqualini
after a crash, the backups seems to do not have worked so well.


/etc/init.d/mailman start
Starting Mailman master qrunner: mailmanctlLogging error: StampedLogger
to '/var/lib/mailman/logs/error'
Traceback (most recent call last):
  File /var/lib/mailman/Mailman/Logging/Logger.py, line 68, in __get_f
  File /usr/lib/python2.6/codecs.py, line 881, in open
file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 13] Permission denied: '/var/lib/mailman/logs/error'
Original log message:
[Errno 13] Permission denied: '/var/lib/mailman/logs/error'
May 04 16:15:41 2011 (31505) IOError reading list extension: [Errno 13]
Permission denied: '/var/lib/mailman/lists/mailman/extend.py'
El sitio de La lista no se encuentra: mailman
May 04 16:15:41 2011 (31505) Site list is missing: mailman
Exception OSError: OSError(13, 'Permission denied') in  failed!


as i can see, i don't have a file:
'/var/lib/mailman/lists/mailman/extend.py'
which generates next error site-list not found: mailman in english


do i have a way to re-create the mailman list?



-- 
Carlos R. Pasqualini pasquali...@fcal.uner.edu.ar
Adm. de Redes - Facultad de Ciencias de la Alimentación - UNER

--
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

Re: [Mailman-Users] how to rebuils site-wide mailman list FIXED

2011-05-04 Thread Carlos R. Pasqualini
just lots of permission issues...
i will need to review my backup script


sorry about the noise!



El mié, 04-05-2011 a las 16:20 -0300, Carlos R. Pasqualini escribió:
 after a crash, the backups seems to do not have worked so well.
 
 
 /etc/init.d/mailman start
 Starting Mailman master qrunner: mailmanctlLogging error: StampedLogger
 to '/var/lib/mailman/logs/error'
 Traceback (most recent call last):
   File /var/lib/mailman/Mailman/Logging/Logger.py, line 68, in __get_f
   File /usr/lib/python2.6/codecs.py, line 881, in open
 file = __builtin__.open(filename, mode, buffering)
 IOError: [Errno 13] Permission denied: '/var/lib/mailman/logs/error'
 Original log message:
 [Errno 13] Permission denied: '/var/lib/mailman/logs/error'
 May 04 16:15:41 2011 (31505) IOError reading list extension: [Errno 13]
 Permission denied: '/var/lib/mailman/lists/mailman/extend.py'
 El sitio de La lista no se encuentra: mailman
 May 04 16:15:41 2011 (31505) Site list is missing: mailman
 Exception OSError: OSError(13, 'Permission denied') in  failed!
 
 
 as i can see, i don't have a file:
 '/var/lib/mailman/lists/mailman/extend.py'
 which generates next error site-list not found: mailman in english
 
 
 do i have a way to re-create the mailman list?
 
 
 
 -- 
 Carlos R. Pasqualini pasquali...@fcal.uner.edu.ar
 Adm. de Redes - Facultad de Ciencias de la Alimentación - UNER
 
 --
 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/pasqualinic%40fcal.uner.edu.ar

-- 
Carlos R. Pasqualini pasquali...@fcal.uner.edu.ar
Adm. de Redes - Facultad de Ciencias de la Alimentación - UNER

--
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