If a file already exists how do I get rid of the error 17 and make a warning message instead?
import os, sys
# Path to be created
path = "/tmp/home/monthly/daily"
try:
os.makedirs(path)
except OSError as e:
if e.errno == 17:
//do something
os.makedirs( path, 0755 );
print "Path is created"
However it still shows the ERRNO 17 message. What can I do?