if/elseコマンドの一部しか機能しないコマンドに問題がある。スクリプトが実行されると、 のif場合はその部分を完了しますが、false の場合はステートメントをname == check_fileスキップして次のタスクに移動します。else以下は、正しく機能していないコードの一部です。
for name in zip_file_names:
copy_to = copy_this.get(name)
if copy_to is not None:
source_file = os.path.join(r'\\svr-dc\ftp site\%s\daily' % item, name)
destination = os.path.join(r"C:\%s" % item, copy_to)
shutil.copy(source_file, destination)
print name, "has been verified and copied."
elif copy_to is not None:
print "%s has been completed." % item
else:
print "Repoll %s for %s" % (item, business_date_one)
print "Once information is downloaded press any key."
re_download = raw_input(" ")
ext_ver_cop_one()
最後elseは解凍したファイル名で操作に必要ないので渡さなくてはならないif/elseのですが、そのif/else文の中がうまく動かない理由がわかりません。特にそのif部分がうまく機能しているためです。考え?