
    g                     &    S SK r S SKrS SKJr  S rg)    N)CommandErrorc                    [         R                  " S5      R                  [         R                  5      nSnU HK  n[         R                  R                  US5      n[         R                  R                  U5      (       d  MI  Sn  O   U(       d  [        S5      eWSU SU -  /n[        R                  " USSS9n[         R                  " SU -  U5        g	)
z7Copy mdb file using mdb_copy utility and rename it
    PATHFmdb_copyTzBmdb_copy not found. You may need to install the lmdb-utils packagez-nz%s.copy.mdb)	close_fdsshellN)osgetenvsplitpathseppathjoinexistsr   
subprocess
check_callrename)file1file2dirsfounddtoolpathmdb_copy_cmdstatuss           0/usr/lib/python3/dist-packages/samba/mdb_util.pyr   r      s     99V""2::.DE77<<:.77>>(##E	   L M 	M dE=5+@AL""<4uMFIIme#U+    )r   r	   samba.netcmdr   r    r   r   <module>r      s   &  	 %,r   