From 58f3e524f998fd5a661c4b9bbb572eac99ed5f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Wed, 17 Jun 2020 17:18:16 +0200 Subject: [PATCH] use pack.pin() in pin.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- pin.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pin.py b/pin.py index 588628d..f522f31 100644 --- a/pin.py +++ b/pin.py @@ -13,12 +13,4 @@ def pinAllPacks(ipfs, contract): # Iterate over packs and make sure they are all pinned for pack in packs: - LOG.info('Pinning: %s', pack) - rval = ipfs.pin(pack.content_hash) - for chash in pack.image_hashes: - LOG.debug('Pinning image: %s', chash) - pinned = ipfs.pin(chash) - if pinned: - LOG.debug('Successfully pinned: %s', chash) - else: - LOG.error('Failed to pin image: %s', chash) + pack.pin(ipfs)