Address last of fomo\'s comments, related to pinner logging, cleanup ipfs module

pull/47/head
Guillermo Rodriguez 2025-02-07 22:43:40 -03:00
parent 5edd7f4db4
commit 5d67b3cd60
No known key found for this signature in database
GPG Key ID: 002CC5F1E6BDA53E
2 changed files with 2 additions and 5 deletions

View File

@ -24,7 +24,7 @@ class AsyncIPFSHTTP:
raise IPFSClientException(resp.text) raise IPFSClientException(resp.text)
return resp.json() return resp.json()
#!/usr/bin/python
async def add(self, file_path: Path, **kwargs): async def add(self, file_path: Path, **kwargs):
files = { files = {
'file': (file_path.name, file_path.open('rb')) 'file': (file_path.name, file_path.open('rb'))

View File

@ -1,6 +1,4 @@
import logging import logging
import traceback
from datetime import datetime, timedelta from datetime import datetime, timedelta
import trio import trio
@ -117,8 +115,7 @@ class SkynetPinner:
n.start_soon(self.task_pin, cid) n.start_soon(self.task_pin, cid)
except OSError: except OSError:
# TODO, use `logging.exception()` here instead ?? logging.exception('OSError while trying to pin?')
traceback.print_exc()
except KeyboardInterrupt: except KeyboardInterrupt:
break break