开发者

multiple try/except in a single function does not work

开发者 https://www.devze.com 2023-02-12 15:18 出处:网络
def creating_folder_for_csv_files(cwd): try: os.makedirs(cwd+\'\\\\migration_data\\\\trade\') except os.error, e:
 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消