mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-02 23:31:25 -07:00
Issue-9704 Better handling of missing python
When they python interpreter is set incorrectly for the machine the file is being checked for (e.g. for the local or the remote), the error manifests as a readability or directory missing error which can be very misleading.
This commit is contained in:
parent
1ec8b6e3c5
commit
4dfd86d847
3 changed files with 8 additions and 1 deletions
|
@ -83,6 +83,9 @@ class ActionModule(object):
|
|||
source = utils.path_dwim(self.runner.basedir, source)
|
||||
|
||||
remote_checksum = self.runner._remote_checksum(conn, tmp, dest, inject)
|
||||
if remote_checksum == '4':
|
||||
result = dict(failed=True, msg="python isn't present on the system. Unable to compute checksum")
|
||||
return ReturnData(conn=conn, result=result)
|
||||
if remote_checksum != '3':
|
||||
result = dict(failed=True, msg="dest '%s' must be an existing dir" % dest)
|
||||
return ReturnData(conn=conn, result=result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue