Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ajkagy committed Apr 12, 2018
2 parents a311862 + 8d91a0f commit 3d70f10
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 6 additions & 1 deletion lib/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,12 @@ def import_gobject_from_vivod(self, vivod, rec):
try:
newdikt = subdikt.copy()
newdikt['object_hash'] = object_hash
if subclass(**newdikt).is_valid() is False:

sub, params = subclass(**newdikt), []
if isinstance(sub, Watchdog):
params = [dashd]

if sub.is_valid(*params) is False:
govobj.vote_delete(vivod)
return (govobj, None)

Expand Down
4 changes: 3 additions & 1 deletion lib/vivod.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

class VivoDaemon():
def __init__(self, **kwargs):
host = kwargs.get('host', '127.0.0.1')
host = config.sentinel_cfg.get('vivo_host', None)
if host is None:
host = kwargs.get('host', '127.0.0.1')
user = kwargs.get('user')
password = kwargs.get('password')
port = kwargs.get('port')
Expand Down
4 changes: 3 additions & 1 deletion lib/vivolib.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import binascii
from misc import printdbg, epoch2str
import time
import config


def is_valid_vivo_address(address, network='mainnet'):
Expand Down Expand Up @@ -250,8 +251,9 @@ def did_we_vote(output):
voted = False
err_msg = ''

_, config_filename = os.path.split(config.vivo_conf)
try:
detail = output.get('detail').get('vivo.conf')
detail = output.get('detail').get(config_filename)
result = detail.get('result')
if 'errorMessage' in detail:
err_msg = detail.get('errorMessage')
Expand Down

0 comments on commit 3d70f10

Please sign in to comment.