Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
beem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
beem
Commits
fd5ecd9b
Commit
fd5ecd9b
authored
7 years ago
by
Holger Nahrstaedt
Browse files
Options
Downloads
Patches
Plain Diff
Fix comment
parent
52203d95
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
beem/comment.py
+3
-3
3 additions, 3 deletions
beem/comment.py
beem/vote.py
+1
-1
1 addition, 1 deletion
beem/vote.py
beemapi/steemnoderpc.py
+3
-1
3 additions, 1 deletion
beemapi/steemnoderpc.py
with
7 additions
and
5 deletions
beem/comment.py
+
3
−
3
View file @
fd5ecd9b
...
...
@@ -72,7 +72,7 @@ class Comment(BlockchainObject):
self
[
p
]
=
Amount
(
self
.
get
(
p
,
"
0.000 SBD
"
),
steem_instance
=
self
.
steem
)
# turn json_metadata into python dict
self
.
_
_
metadata_to_dict
()
self
.
_metadata_to_dict
()
self
[
"
tags
"
]
=
[]
self
[
'
community
'
]
=
''
if
isinstance
(
self
[
'
json_metadata
'
],
dict
):
...
...
@@ -84,13 +84,13 @@ class Comment(BlockchainObject):
def
_metadata_to_dict
(
self
):
"""
turn json_metadata into python dict
"""
meta_str
=
self
.
get
(
"
json_metadata
"
,
"
{}
"
)
if
meta_str
==
"
{}
"
:
self
[
'
json_metadata
'
]
=
meta_str
if
isinstance
(
meta_str
,
(
string_types
,
bytes_types
,
bytearray
)):
try
:
self
[
'
json_metadata
'
]
=
json
.
loads
(
meta_str
)
except
:
self
[
'
json_metadata
'
]
=
{}
else
:
self
[
'
json_metadata
'
]
=
{}
def
refresh
(
self
):
if
self
.
identifier
==
""
:
...
...
This diff is collapsed.
Click to expand it.
beem/vote.py
+
1
−
1
View file @
fd5ecd9b
...
...
@@ -100,7 +100,7 @@ class Vote(BlockchainObject):
if
x
[
"
voter
"
]
==
voter
:
vote
=
x
if
not
vote
:
raise
VoteDoesNotExistsException
raise
VoteDoesNotExistsException
(
self
.
identifier
)
super
(
Vote
,
self
).
__init__
(
vote
,
id_item
=
"
authorpermvoter
"
,
steem_instance
=
self
.
steem
)
self
.
identifier
=
construct_authorpermvoter
(
author
,
permlink
,
voter
)
...
...
This diff is collapsed.
Click to expand it.
beemapi/steemnoderpc.py
+
3
−
1
View file @
fd5ecd9b
...
...
@@ -56,9 +56,11 @@ class SteemNodeRPC(GrapheneRPC):
# Forward call to GrapheneWebsocketRPC and catch+evaluate errors
self
.
error_cnt_call
=
cnt
reply
=
super
(
SteemNodeRPC
,
self
).
rpcexec
(
payload
)
if
self
.
next_node_on_empty_reply
and
not
bool
(
reply
):
if
self
.
next_node_on_empty_reply
and
not
bool
(
reply
)
and
self
.
n_urls
>
1
:
sleep_and_check_retries
(
self
.
num_retries_call
,
cnt
,
self
.
url
,
str
(
"
Empty reply
"
),
sleep
=
False
)
self
.
next
()
cnt
=
0
self
.
error_cnt_call
=
0
doRetry
=
True
else
:
self
.
next_node_on_empty_reply
=
False
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment