multiple try/except in a single function does not work
def creating_folder_for_csv_files(cwd):
try:
os.makedirs(cwd+'\\migration_data\\trade')
except os.error, e:
print "Could not create the destination folder for CSV files"
# end of first try/except block
try:
os.makedirs(cwd+'\\migration_data\\voucher')
except os.error, e:
print "Could not create the destination folder for CSV files"
I开发者_开发技巧n my code, the first try/except block works but the second does not. What's the problem?
The voucher
might already exist.
精彩评论