Dec-04-2018, 04:28 PM
Look carefully at your code. I have a feeling that you've been looking at it so long, you've developed tunnel vision, and are skipping over parts of what's happening.
Here, let me help rewrite it for you:
(Dec-04-2018, 02:22 PM)Fabrizio Wrote:if (os.path.isdir(source_dir)): print "source directory not found"
Here, let me help rewrite it for you:
source_dir = "/literally_nowhere" directory_exists = os.path.isdir(source_dir) if directory_exists: print("It doesn't exist")Or, to break it down even further:
if False: print("It's True")Obviously the
else
part is running: the condition you're checking is False.