[Tutor] Fwd: Executing a command from a specific directory

Sander Sweers sander.sweers at gmail.com
Wed Sep 16 15:03:58 CEST 2009


On Wed, 2009-09-16 at 18:03 +0530, Ansuman Dash wrote:
>             if "Request timed out.." not in a:
>                 print("Ping is not successful.")
>                 pLogger.info("Ping is not successful.")

This will check for the string "Request timed out.." is NOT in a. Now
when the ping is successfull the string will not be in a. I suspect you
are looking for the logic being reversed so remove the not.

Greets
Sander




More information about the Tutor mailing list