³ò
OÉcIc        	   @   sD  d  Z  d d k Z d d k Z d Z d Z d Z d Z d Z d Z	 y/ e i
 ƒ  Z e i ƒ  Z e g e i ƒ  Z Wn( e j
 o d Z d Z d g Z n Xd Z e d j Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z  d Z! d Z" d Z# g  Z$ d Z% h  Z& d Z' d Z( d Z) d Z* d Z+ d Z, d Z- g  Z. d Z/ d Z0 d Z1 d Z2 d	 Z3 d	 Z4 d
 Z5 d Z6 d Z7 d	 Z8 d Z9 d	 Z: d Z; d Z< d Z= d Z> d	 Z? d Z@ d ZA d ZB d ZC d ZD d „  ZE d „  ZF d „  ZG d „  ZH d „  ZI d d d	 d „ ZJ d „  ZK d „  ZL d d „ ZM d „  ZN d S(   s:   Hold a variety of constants usually set at initialization.iÿÿÿÿNs   1.2.5i   i   iô  i    t   ;i   s‰   (?i).*\.(gz|z|bz|bz2|tgz|zip|rpm|deb|jpg|jpeg|gif|png|jp2|mp3|ogg|avi|wmv|mpeg|mpg|rm|mov|flac|shn|pgp|gpg|rz|lzh|zoo|lharc|rar|arj|asc)$t   alliÿ  c         C   s   t  ƒ  |  S(   s,   Return the value of something in this module(   t   globals(   t   name(    (    s9   /var/lib/python-support/python2.5/rdiff_backup/Globals.pyt   getô   s    c         C   s   t  ƒ  |  d j	 S(   s!   Returns true if value is not NoneN(   R   t   None(   R   (    (    s9   /var/lib/python-support/python2.5/rdiff_backup/Globals.pyt   is_not_Noneø   s    c         C   s   t  i |  ƒ | t ƒ  |  <d S(   sê   Set the value of something in this module

	Use this instead of writing the values directly if the setting
	matters to remote sides.  This function updates the
	changed_settings list, so other connections know to copy the
	changes.

	N(   t   changed_settingst   appendR   (   R   t   val(    (    s9   /var/lib/python-support/python2.5/rdiff_backup/Globals.pyt   setü   s    	c         C   s   | t  ƒ  |  <d S(   s/   Like set above, but only set current connectionN(   R   (   R   R	   (    (    s9   /var/lib/python-support/python2.5/rdiff_backup/Globals.pyt	   set_local  s    c         C   sN   y t  | ƒ } Wn* t j
 o t i d |  | f ƒ n Xt |  | ƒ d S(   s)   Like set, but make sure val is an integers<   Variable %s must be set to an integer -
received %s instead.N(   t   intt
   ValueErrort   Logt
   FatalErrorR
   (   R   R	   t   intval(    (    s9   /var/lib/python-support/python2.5/rdiff_backup/Globals.pyt   set_integer  s     	c            sö   ‡  ‡ ‡ ‡ f d †  } y t  | ƒ } Wn t j
 o | ƒ  n Xˆ d j	 oC ˆ o | ˆ j  o | ƒ  q• ˆ o | ˆ j o | ƒ  q• n ˆ d j	 oC ˆ o | ˆ j o | ƒ  qå ˆ o | ˆ j o | ƒ  qå n t ˆ  | ƒ d S(   s8   Like set, but make sure val is float within given boundsc             sÝ   d ˆ  f }  ˆ d  j	 oD ˆ d  j	 o7 |  d ˆ ˆ f 7}  ˆ o |  d 7}  qÌ |  d 7}  no ˆ d  j	 p ˆ d  j	 oT ˆ o
 d } n d } ˆ d  j	 o |  d | ˆ f 7}  qÌ |  d | ˆ f 7}  n t i |  ƒ d  S(	   Ns"   Variable %s must be set to a floats    between %s and %s t	   inclusives   not inclusives   or equal to t    s    greater than %s%ss    less than %s%s(   R   R   R   (   t   st   inclusive_string(   R   R   t   maxt   min(    s9   /var/lib/python-support/python2.5/rdiff_backup/Globals.pyt   error  s      
N(   t   floatR   R   R
   (   R   R	   R   R   R   R   t   f(    (   R   R   R   R   s9   /var/lib/python-support/python2.5/rdiff_backup/Globals.pyt	   set_float  s           c         C   s   t  ƒ  |  | S(   s(   Return val from dictionary in this class(   R   (   R   t   key(    (    s9   /var/lib/python-support/python2.5/rdiff_backup/Globals.pyt   get_dict_val.  s    c         C   s   | t  ƒ  |  | <d S(   s&   Set value for dictionary in this classN(   R   (   R   R   R	   (    (    s9   /var/lib/python-support/python2.5/rdiff_backup/Globals.pyt   set_dict_val2  s    c         C   s+   x$ t  D] } | i i |  | | ƒ q Wd S(   s:   Compile re_string on all existing connections, set to nameN(   t   connectionst   Globalst   postset_regexp_local(   R   t	   re_stringt   flagst   conn(    (    s9   /var/lib/python-support/python2.5/rdiff_backup/Globals.pyt   postset_regexp6  s     c         C   s>   | o t  i | | ƒ t ƒ  |  <n t  i | ƒ t ƒ  |  <d S(   s&   Set name to compiled re_string locallyN(   t   ret   compileR   (   R   R"   R#   (    (    s9   /var/lib/python-support/python2.5/rdiff_backup/Globals.pyR!   ;  s     (O   t   __doc__R&   t   ost   versionR   t   current_timet	   blocksizet   conn_bufsizet   pipeline_max_lengtht   servert   getuidt   process_uidt   getgidt   process_gidt	   getgroupst   process_groupst   AttributeErrort   change_ownershipt   change_mirror_permst   preserve_atimet
   eas_activet	   eas_writet   eas_connt   acls_activet
   acls_writet	   acls_connt   win_acls_activet   win_acls_writet   win_acls_connt   resource_forks_activet   resource_forks_writet   resource_forks_connt   carbonfile_activet   carbonfile_writet   carbonfile_connt   local_connectionR   t   connection_numbert   connection_dictt   isbackup_readert   backup_readert   isbackup_writert   backup_writert   client_connt   issourcet   isdestR   t   rbdirt   chars_to_quotet   quoting_chart   parsable_outputt   preserve_hardlinkst   compressiont   no_compression_regexp_stringt   no_compression_regexpt   null_separatort   ssh_compressiont   print_statisticst   file_statisticst   select_mirrort   ITRBt   security_levelt   restrict_patht   compare_inodet   fsync_directoriest   never_drop_aclst   permission_maskt   symlink_permst   remote_tempdirR   R   R
   R   R   R   R   R   R%   R!   (    (    (    s9   /var/lib/python-support/python2.5/rdiff_backup/Globals.pys   <module>   sš   							