From 7578ac874b029339e63f18b9bc23a1d760d7ee51 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Sun, 22 Apr 2018 21:19:57 -0500 Subject: [PATCH] now only show block contents debug if txt --- onionr/communicator.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/onionr/communicator.py b/onionr/communicator.py index 35d8bcfd..ce83199f 100755 --- a/onionr/communicator.py +++ b/onionr/communicator.py @@ -251,11 +251,11 @@ class OnionrCommunicate: digest = digest.decode() if digest == hash.strip(): self._core.setData(data) - if data.startswith('-txt-'): - self._core.setBlockType(hash, 'txt') logger.info('Successfully obtained data for ' + hash, timestamp=True) - if len(data) < 120: - logger.debug('Block text:\n' + data) + if data.startswith(b'-txt-'): + self._core.setBlockType(hash, 'txt') + if len(data) < 120: + logger.debug('Block text:\n' + data) else: logger.warn("Failed to validate " + hash + " " + " hash calculated was " + digest)