Skip to content

Commit

Permalink
Prepare release 0.19.19
Browse files Browse the repository at this point in the history
* some minor improvements
  • Loading branch information
holgern committed Apr 5, 2018
1 parent 8d6478e commit 02a5128
Show file tree
Hide file tree
Showing 5 changed files with 612 additions and 35 deletions.
13 changes: 13 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ Current build status
:target: https://codeclimate.com/github/holgern/beem/test_coverage
:alt: Test Coverage

Support
=======
You may find help at https://discord.gg/4HM592V. The discord channel can also be used to discuss things about beem.

Installation
============
Expand Down Expand Up @@ -132,6 +135,16 @@ Documentation is available at http://beem.readthedocs.io/en/latest/

Changelog
=========
0.19.19
-------
* serveral bug fixes and improvements
* coverage improved
* steem.get_blockchain_version added
* post and comment_options moved from beem.commment to beem.steem
* wait_for_and_get_block improved
* num_retries handling improved
* block_numbers can be set as start and stop in account.history and account.history_reverse, when use_block_num=True (default)

0.19.18
-------
* bug fix release
Expand Down
59 changes: 25 additions & 34 deletions beembase/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,7 @@
default_prefix = "STM"


def getOperationNameForId(i):
""" Convert an operation id into the corresponding string
"""
for key in operations:
if int(operations[key]) is int(i):
return key
return "Unknown Operation ID %d" % i


def checkForClass(self, args):
def check_for_class(self, args):
if isArgsThisClass(self, args):
self.data = args[0].data
return True
Expand All @@ -53,7 +44,7 @@ def checkForClass(self, args):
class Transfer(GrapheneObject):
def __init__(self, *args, **kwargs):
# Allow for overwrite of prefix
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -78,7 +69,7 @@ def __init__(self, *args, **kwargs):

class Vote(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -92,7 +83,7 @@ def __init__(self, *args, **kwargs):

class Transfer_to_vesting(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -105,7 +96,7 @@ def __init__(self, *args, **kwargs):

class Withdraw_vesting(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -117,7 +108,7 @@ def __init__(self, *args, **kwargs):

class Account_witness_vote(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -130,7 +121,7 @@ def __init__(self, *args, **kwargs):

class Op_wrapper(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -142,7 +133,7 @@ def __init__(self, *args, **kwargs):
class Account_create(GrapheneObject):

def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand Down Expand Up @@ -173,7 +164,7 @@ def __init__(self, *args, **kwargs):
class Account_create_with_delegation(GrapheneObject):

def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand Down Expand Up @@ -205,7 +196,7 @@ def __init__(self, *args, **kwargs):

class Account_update(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand Down Expand Up @@ -245,7 +236,7 @@ def __init__(self, *args, **kwargs):

class Witness_update(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -268,7 +259,7 @@ def __init__(self, *args, **kwargs):

class Comment(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -293,7 +284,7 @@ def __init__(self, *args, **kwargs):

class Custom_json(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand Down Expand Up @@ -321,7 +312,7 @@ def __init__(self, *args, **kwargs):

class Comment_options(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand Down Expand Up @@ -351,7 +342,7 @@ def __init__(self, *args, **kwargs):

class Delete_comment(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -364,7 +355,7 @@ def __init__(self, *args, **kwargs):

class Feed_publish(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -377,7 +368,7 @@ def __init__(self, *args, **kwargs):

class Convert(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -391,7 +382,7 @@ def __init__(self, *args, **kwargs):

class Set_withdraw_vesting_route(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -406,7 +397,7 @@ def __init__(self, *args, **kwargs):

class Limit_order_cancel(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -419,7 +410,7 @@ def __init__(self, *args, **kwargs):

class Delegate_vesting_shares(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -433,7 +424,7 @@ def __init__(self, *args, **kwargs):

class Limit_order_create(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -450,7 +441,7 @@ def __init__(self, *args, **kwargs):

class Transfer_from_savings(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -469,7 +460,7 @@ def __init__(self, *args, **kwargs):

class Cancel_transfer_from_savings(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -482,7 +473,7 @@ def __init__(self, *args, **kwargs):

class Claim_reward_balance(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand All @@ -497,7 +488,7 @@ def __init__(self, *args, **kwargs):

class Transfer_to_savings(GrapheneObject):
def __init__(self, *args, **kwargs):
if checkForClass(self, args):
if check_for_class(self, args):
return
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]
Expand Down
6 changes: 5 additions & 1 deletion examples/watching_the_watchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from beem.comment import Comment
from beem.account import Account
from beem.utils import parse_time, construct_authorperm
from beem import exceptions
import logging
log = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
Expand Down Expand Up @@ -123,7 +124,10 @@ def user_info(accounts):
if vote_event["weight"] < 0:
authorperm = construct_authorperm(vote_event["author"], vote_event["permlink"])
# print(authorperm)
process_vote_content(Comment(authorperm))
try:
process_vote_content(Comment(authorperm))
except exceptions.ContentDoesNotExistsException:
print("Could not find Comment: %s" % (authorperm))
al = list()
if not vote_event["voter"] in self.looked_up:
al.append(vote_event["voter"])
Expand Down
Loading

0 comments on commit 02a5128

Please sign in to comment.