;ò
œ)?Bc           @   so   d  Z  d k Z d k Z d k Z d k l Z d k l Z d d „ Z d „  Z	 e
 d j o e d ƒ n d S(	   sŒ  Reset a list's web_page_url attribute to the default setting.

This script is intended to be run as a bin/withlist script, i.e.

% bin/withlist -l -r fix_url listname [options]

Options:
    -u urlhost
    --urlhost=urlhost
        Look up urlhost in the virtual host table and set the web_page_url and
        host_name attributes of the list to the values found.  This
        essentially moves the list from one virtual domain to another.

        Without this option, the default web_page_url and host_name values are
        used.

    -v / --verbose
        Print what the script is doing.

If run standalone, it prints this help text and exits.
N(   s   mm_cfg(   s   _s    c         C   s8   t  t i d d ƒ ƒ GH| o	 | GHn t i |  ƒ d  S(   Ns   %s   %%(   s   _s   __doc__s   replaces   msgs   syss   exits   code(   s   codes   msg(    (    s   /var/mailman/bin/fix_url.pys   usage2   s    	c   
      G   s[  y% t  i  | d d d g ƒ \ }	 } Wn% t  i j
 o } t d | ƒ n Xd } t } } xN |	 D]F \ } } | d d f j o
 | } qd | d d	 f j o
 d } qd qd W| o, t i | } t i i | i ƒ  | ƒ } n t i t i } t i } | o t d
 ƒ GHn | |  _ | o t d ƒ GHn | |  _ t d ƒ GH|  i ƒ  |  i ƒ  d  S(   Ns   u:vs   urlhost=s   verbosei   i    s   -us	   --urlhosts   -vs	   --verboses)   Setting web_page_url to: %(web_page_url)ss"   Setting host_name to: %(mailhost)ss   Saving list(   s   getopts   argss   optss   errors   msgs   usages   verboses   Nones   urlhosts   mailhosts   opts   args   mm_cfgs   DEFAULT_URL_PATTERNs   web_page_urls   VIRTUAL_HOSTSs   gets   lowers   DEFAULT_URL_HOSTs   DEFAULT_EMAIL_HOSTs   _s   mlists	   host_names   Saves   Unlock(
   s   mlists   argss   opts   verboses   msgs   mailhosts   urlhosts   args   web_page_urls   opts(    (    s   /var/mailman/bin/fix_url.pys   fix_url:   s4    %
 
			
s   __main__i    (   s   __doc__s   syss   getopts   pathss   Mailmans   mm_cfgs   Mailman.i18ns   _s   usages   fix_urls   __name__(   s   fix_urls   pathss   syss   mm_cfgs   usages   getopts   _(    (    s   /var/mailman/bin/fix_url.pys   ?'   s   				!