STINNER Victor <victor.stin...@haypocalc.com> added the comment: > The last line references, buf. It wont be available if a > socket.timeout had happened. So, it can simply be moved to > the line below buf = f.read(). Attaching the patch with > these changes.
Good catch :-) > Question: Were you able to simulate a timeout at kernel.org > site to test this? If yes, how? I used a firewall rule. On Linux, you can try: iptables -I OUTPUT DROP to drop all output packets (and then iptables -F to remove all rules). It's not reliable, but the test does sometimes fail :-) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8460> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com