shugo (Shugo Maeda) wrote: > Please retry on FTPReplyError as a workaround. I have implemented this workaround and it has successfully recovered several times now. FWIW the code is: ~~~ ruby retries = 3 begin ftp.getbinaryfi...Phrogz (Gavin Kistner)
shugo (Shugo Maeda) wrote: > 226 is returned as a reply of PASV, but it's not RFC compilant and > ... I agree that this appears to be a bad server. Thanks for the suggestion to catch the error and retry. (Not sure why I didn't think of...Phrogz (Gavin Kistner)
With `debug_mode` on, I see this in my logs: ~~~ D, [2017-04-05T12:55:33.047600 #5076] DEBUG -- : ...downloading archived developerdownloads_26549.esw3cdc_S.201703190000-0300-33.gz D, [2017-04-05T12:55:34.066636 #5076] DEBUG -- : .....Phrogz (Gavin Kistner)
I have a script that downloads many files via FTP. `ftp.getbinaryfile` occasionally fails (about 7 times while downloading ~2000 files). Here's the code: ~~~ ruby Net::FTP.open(SITE) do |ftp| ftp.login USER, PASS ftp.passive...Phrogz (Gavin Kistner)
Add `Set#===` as an alias for `Set#include?` so that sets may be used in `case` statements: ~~~ require 'set' GOOD_COMMANDS = Set[ :foo, :bar, :jim ] BAD_COMMANDS = Set[ :baz, :bax, :jam ] ODD_COMMANDS = Set[ :quux, :xyzzy ] ...Phrogz (Gavin Kistner)