Replace `ismethod` or `isfunction` with `callable`.
@@ -6,7 +6,6 @@ for a deploy.
from __future__ import division, unicode_literals
-from inspect import isfunction, ismethod
from socket import (
error as socket_error,
timeout as timeout_error,
@@ -167,7 +166,7 @@ def get_facts(state, name, args=None, ensure_hosts=None):
# Work out the command
command = fact.command
- if ismethod(command) or isfunction(command):
+ if callable(command):
# Generate actual arguments by passing strings as jinja2 templates
host_args = [get_arg_value(state, host, arg) for arg in args]
