def _process_image(self, local_uri, remote_uri, file): # Moustache it up! new_filename = moustachefy(file.name) try: file_selector = FileSelector.for_file(new_filename.encode('utf-8')) except IOError: log.error('Cannot open file %s' % new_filename) return # Send it! self._send_file(local_uri, remote_uri, file_selector)
def file_selector(self): return FileSelector.for_file(self.name.encode('utf-8'), hash=self.hash)