
    b                     0    d dl Z d dlZd dlZd dlmZ d ZdS )    N)CommandErrorc                    t          j        d                              t           j                  }d}|D ]E}t           j                            |d          }t           j                            |          rd} nF|st          d          |d| d| z  g}t          j	        |dd          }t          j
        d| z  |           d	S )
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     9V""2:..DE  7<<:..7>>(## 	EE	  M L M M 	M dE=5+@AL"<4uMMMFIme#U+++++    )sambar   r	   samba.netcmdr   r    r   r   <module>r       sP   &      				 % % % % % %, , , , ,r   