def ipfs_get_from_hash(self, lib, _hash):
        try:
            cmd = "ipfs get".split()
            cmd.append(_hash)
            util.command_output(cmd)
        except (__HOLE__, subprocess.CalledProcessError) as err:
            self._log.error('Failed to get {0} from ipfs.\n{1}',
                            _hash, err.output)
            return False

        self._log.info('Getting {0} from ipfs', _hash)
        imp = ui.commands.TerminalImportSession(lib, loghandler=None,
                                                query=None, paths=[_hash])
        imp.run()
        shutil.rmtree(_hash)
dataset/ETHPy150Open beetbox/beets/beetsplug/ipfs.py/IPFSPlugin.ipfs_get_from_hash