Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改了save_upload_file函数在打开文件失败执行异常处理报错的问题。 #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ddkangfu
Copy link

修改了save_upload_file函数在打开文件失败执行异常处理代码时报“local variable 'f' referenced before assignment”的错误。

@ddkangfu
Copy link
Author

为什么会忽略try except呢?
except块里return了,不会在f=None的情况下执行到第二个f.close()的。

@recall704
Copy link

额。。不小心看花眼了。
是觉得 开始的 f = None 可以不要

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants