On 03/03/2014 04:46 PM, DongInn Kim wrote: > Can anyone please help me to debug the syntax error in mm_cfg.py? > > ompi_list = [ 'test-crest', 'osl-test' ] > if listname in ompi_list: > archive_url = > ("http://www.open-mpi.org/community/lists/devel/%s/date.php" % > (time.strftime("%Y/%m"))) > DEFAULT_MSG_FOOTER = """_______________________________________________ > %(real_name)s mailing list > %(real_name)s@%(host_name)s > subscribe: %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s > searchable archives: %(archive_url)s > """ % { 'archive_url' : archive_url } > > > What I wanted here is to apply the new DEFAULT_MSG_FOOTER only for the > specific mailing lists. > Is there something wrong here?
There are several thinks wrong. At the time mm_cfg.py is imported, the name listname is not defined. This is your syntax error, but beyond that, you have a huge misunderstanding of how to go about what you are trying to do. DEFAULT_MSG_FOOTER only establishes the default value for a newly created list. What you want is to set the msg_footer attribute for the 'test-crest' and 'osl-test' lists to something like: """_______________________________________________ %(real_name)s mailing list %(real_name)s@%(host_name)s subscribe: %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s searchable archives: http://www.open-mpi.org/community/lists/devel/%(time)s/date.php """ And then modify Mailman/Handlers/Decorate.py to import time and augment the replacement dictionary by adding {'time': time.strftime("%Y/%m")}. -- 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 https://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: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org