def get_key(self, name):
try:
# pull it down from ipfs
self.api.get('{}/names/{}'.format(self.root_hash, name))
# stores in cwdir, so load the files into memory and delete them
n = self.file_to_memory('{}/{}/n'.format(os.getcwd(), name))
e = self.file_to_memory('{}/{}/e'.format(os.getcwd(), name))
os.rmdir('{}/{}'.format(os.getcwd(), name))
return (n, e)
except:
return False
评论列表
文章目录