#NEWLINE# def cp( self , src , dst ) : #NEWLINE# #INDENT# 'copies (recuresively or not) files or directories\n\n        :param string src: source to copy\n        :param string dst: destination to copy to\n        :param bool recurse: should the copying process be recursive?\n        ' #NEWLINE# lgr . debug ( 'Copying {0} to {1}' . format ( src , dst ) ) #NEWLINE# try : #NEWLINE# #INDENT# shutil . copytree ( src , dst ) #NEWLINE# #UNINDENT# except OSError as e : #NEWLINE# #INDENT# if ( e . errno == errno . ENOTDIR ) : #NEWLINE# #INDENT# shutil . copy ( src , dst ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# lgr . error ( 'Copying failed. Error: {0}' . format ( e ) ) #NEWLINE# return False