def _int_move_and_sym_link(cur_file_path, new_file_path): self._log(u"Moving then symbolic linking file from " + cur_file_path + " to " + new_file_path, logger.DEBUG) try: helpers.moveAndSymlinkFile(cur_file_path, new_file_path) helpers.chmodAsParent(new_file_path) except (IOError, OSError), e: self._log("Unable to link file " + cur_file_path + " to " + new_file_path + ": " + ex(e), logger.ERROR) raise e
def _int_move_and_sym_link(cur_file_path, new_file_path, success_tmpl=u' %s to %s'): try: helpers.moveAndSymlinkFile(cur_file_path, new_file_path) helpers.chmodAsParent(new_file_path) self._log(u'Moved then symbolic linked file from' + (success_tmpl % (cur_file_path, new_file_path)), logger.DEBUG) except (IOError, OSError), e: self._log(u'Unable to link file %s<br />.. %s' % (success_tmpl % (cur_file_path, new_file_path), str(e)), logger.ERROR) raise e