Commit 16b2739
authored
Fix undefined name 'filename' in ftp_send_receive.py
Also uses __with open() as__ syntax to ensure that file handles are properly closed.
```
./ftp_send_receive.py:24:27: F821 undefined name 'filename'
ftp.retrbinary('RETR ' + filename, LocalFile.write, 1024)
^
```1 parent 6915a95 commit 16b2739
1 file changed
+8
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments