now only show block contents debug if txt

This commit is contained in:
Kevin Froman 2018-04-22 21:19:57 -05:00
parent 8853926287
commit 7578ac874b
No known key found for this signature in database
GPG Key ID: 0D414D0FE405B63B

View File

@ -251,9 +251,9 @@ class OnionrCommunicate:
digest = digest.decode() digest = digest.decode()
if digest == hash.strip(): if digest == hash.strip():
self._core.setData(data) self._core.setData(data)
if data.startswith('-txt-'):
self._core.setBlockType(hash, 'txt')
logger.info('Successfully obtained data for ' + hash, timestamp=True) logger.info('Successfully obtained data for ' + hash, timestamp=True)
if data.startswith(b'-txt-'):
self._core.setBlockType(hash, 'txt')
if len(data) < 120: if len(data) < 120:
logger.debug('Block text:\n' + data) logger.debug('Block text:\n' + data)
else: else: