add error logging to ipfs add func

pull/8/head
Konstantine Tsafatinos 2023-06-26 12:38:26 -04:00
parent acd8ba91e5
commit f8c744e6b4
1 changed files with 2 additions and 0 deletions

2
skynet/ipfs/docker.py 100644 → 100755
View File

@ -21,6 +21,8 @@ class IPFSDocker:
def add(self, file: str) -> str:
ec, out = self._container.exec_run(
['ipfs', 'add', '-w', f'/export/{file}', '-Q'])
if ec != 0:
logging.error(out)
assert ec == 0
return out.decode().rstrip()