Fix positional argument bug
This commit is contained in:
parent
71f4318719
commit
f0e842eae4
4 changed files with 8 additions and 11 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue