Fix positional argument bug

This commit is contained in:
Arinerron 2018-05-12 23:37:47 -07:00
parent 71f4318719
commit f0e842eae4
No known key found for this signature in database
GPG key ID: 99383627861C62F0
4 changed files with 8 additions and 11 deletions

View file

@ -97,13 +97,13 @@ def parseBlock(hash, key):# deal with block metadata
blockContent = pluginapi.get_core().getData(hash)
try:
blockMetadata = json.loads(blockContent[:blockContent.decode().find(b'}') + 1].decode())
blockMetadata = json.loads(blockContent[:blockContent.decode().find('\n')].decode())
try:
blockMeta2 = json.loads(blockMetadata['meta'])
except KeyError:
blockMeta2 = {'type': ''}
pass
blockContent = blockContent[blockContent.rfind(b'}') + 1:]
blockContent = blockContent[blockContent.rfind(b'\n') + 1:]
try:
blockContent = blockContent.decode()
except AttributeError: