
    Id                     .    d dl Z d dlZd dlZd dlmZ d Zy)    N)CommandErrorc                    t        j                  d      j                  t         j                        }d}|D ]E  }t         j                  j                  |d      }t         j                  j                  |      sCd} n |st        d      d| d| z  g}t        j                  |dd      }t        j                  d| z  |       y	)
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+    )sambar   r	   samba.netcmdr   r    r   r   <module>r       s   &   	 %,r   