Hi,
I have this strange issue. The following code was working fine (I think)
as :
Hi,
I have this strange issue. The following code was working fine (I think)
as :
I think I replied to the previous copy of this one, please see the other thread.
It can sometimes be confusing as the very first post to the list is moderated to prevent spam, so I occasionally double approve a duplicate post.
I think I replied to the previous copy of this one, please see the other
thread.
Sorry about that.
However, I think you might really want this:
when: a is defined and a.stat.isfile
OR (depending on use case)
when: a is defined and not a.stat.isfileMaybe try one of those first...
I played with that code where /usr/local/bin/python3.4 does not exist :
I think you are misunderstanding the return codes of the stat module.
When the file is not there, it doesn’t register a “None” in the file location.
Insert this line, and you’ll see what I mean:
I would also recommend naming variables something other than “I”, for readability purposes. python34 would be a good variable name
I think you are misunderstanding the return codes of the stat module.
Nooo.. Why would you say that ?
When the file is not there, it doesn't register a "None" in the file
location.Insert this line, and you'll see what I mean:
- debug: var=I
That, is the killer tip ! I was blind, now I see.
Problem solved !
I would also recommend naming variables something other than "I", for
readability purposes. python34 would be a good variable name
I will.
Thanks very thanks a lot for teaching me how to fish !