Skip to content

Commit

Permalink
Fix broken Travis unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mohierf committed Jan 29, 2018
1 parent 8eebcd2 commit b5fac4c
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions alignak/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,7 @@ def do_daemon_init_and_start(self):
logger.info("Created")

logger.info("Starting http_daemon thread..")
# pylint: disable=bad-thread-instantiation
self.http_thread = threading.Thread(None, self.http_daemon_thread, 'http_thread')
self.http_thread.daemon = True
self.http_thread.start()
Expand Down
4 changes: 2 additions & 2 deletions alignak/daemons/arbiterdaemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,9 +549,9 @@ def manage_missing_daemons(self):
if ret is not None:
logger.error("*** %s exited on start!", daemon_name)
for line in iter(self.my_satellites[daemon_name].stdout.readline, b''):
logger.error(">>> " + line.rstrip())
logger.error(">>> %s", line.rstrip())
for line in iter(self.my_satellites[daemon_name].stderr.readline, b''):
logger.error(">>> " + line.rstrip())
logger.error(">>> %s", line.rstrip())
result = False
else:
logger.info("%s running (pid=%d)",
Expand Down
1 change: 1 addition & 0 deletions alignak/macroresolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ def _get_type_of_macro(macros, objs):
continue

@staticmethod
# pylint: disable=inconsistent-return-statements
def _resolve_argn(macro, args):
"""Get argument from macro name
ie : $ARG3$ -> args[2]
Expand Down
4 changes: 4 additions & 0 deletions alignak/objects/satellitelink.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ def add_failed_check_attempt(self, reason=''):
if self.attempt == self.max_check_attempts:
self.set_dead()

# pylint: disable=inconsistent-return-statements
def update_infos(self, now):
"""Update satellite info each self.check_interval seconds
so we smooth arbiter actions for just useful actions.
Expand Down Expand Up @@ -348,6 +349,7 @@ def known_conf_managed_push(self, cfg_id, push_flavor):
"""
self.managed_confs[cfg_id] = push_flavor

# pylint: disable=inconsistent-return-statements
def ping(self):
"""Send a HTTP request to the satellite (GET /ping)
Add failed attempt if an error occurs
Expand Down Expand Up @@ -463,6 +465,7 @@ def have_conf(self, magic_hash=None):

return False

# pylint: disable=inconsistent-return-statements
def remove_from_conf(self, sched_id): # pragma: no cover, no more used
"""Send a HTTP request to the satellite (GET /remove_from_conf)
Tell a satellite to remove a scheduler from conf
Expand Down Expand Up @@ -502,6 +505,7 @@ def remove_from_conf(self, sched_id): # pragma: no cover, no more used

return False

# pylint: disable=inconsistent-return-statements
def update_managed_conf(self):
"""Send a HTTP request to the satellite (GET /what_i_managed)
and update managed_conf attribute with dict (cleaned)
Expand Down
1 change: 1 addition & 0 deletions alignak/objects/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1597,6 +1597,7 @@ def explode_services_from_hosts(self, hosts, service, hnames):
new_s.host_name = hname
self.add_item(new_s)

# pylint: disable=inconsistent-return-statements
def _local_create_service(self, hosts, host_name, service):
"""Create a new service based on a host_name and service instance.
Expand Down
1 change: 1 addition & 0 deletions alignak/property.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ class DictProp(Property):
"""Dict property
"""
# pylint: disable=keyword-arg-before-vararg
def __init__(self, elts_prop=None, *args, **kwargs):
"""Dictionary of values.
If elts_prop is not None, must be a Property subclass
Expand Down
2 changes: 1 addition & 1 deletion test/test_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def test_modulemanager_several_modules(self):
for mod in self.arbiter.conf.modules:
print (mod.__dict__)

time_hacker.set_real_time()
# time_hacker.set_real_time()

# Create an Alignak module
mod = Module({
Expand Down

0 comments on commit b5fac4c

Please sign in to comment.