Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
sysread error
Alfonso Caponi
7/17/2008 10:11:00 AM
Hi List,
I wrote a simple script that import a file list of hosts and try to
connect.
Before the end of the file the script exits with this error:
/usr/lib/ruby/1.8/net/protocol.rb:133:in `sysread': end of file reached
(EOFError)
I using this code to import list:
file = File.new(list,"r")
begin
while (line = file.gets)
line.chomp!
iplist.push line
end
rescue EOFError
f.close
end
Can you help me please?
Thank you very much
Al
--
Posted via
http://www.ruby-...
.
2 Answers
David A. Black
7/17/2008 11:44:00 AM
0
Hi --
On Thu, 17 Jul 2008, Alfonso Caponi wrote:
> Hi List,
>
> I wrote a simple script that import a file list of hosts and try to
> connect.
> Before the end of the file the script exits with this error:
>
> /usr/lib/ruby/1.8/net/protocol.rb:133:in `sysread': end of file reached
> (EOFError)
>
> I using this code to import list:
>
> file = File.new(list,"r")
> begin
> while (line = file.gets)
> line.chomp!
> iplist.push line
> end
> rescue EOFError
> f.close
> end
>
> Can you help me please?
> Thank you very much
It looks like the error is in the part of the script where you're
connecting to hosts, since it's in the net code.
David
--
Rails training from David A. Black and Ruby Power and Light:
Intro to Ruby on Rails July 21-24 Edison, NJ
Advancing With Rails August 18-21 Edison, NJ
See
http://www.r...
for details and updates!
Alfonso Caponi
7/17/2008 1:45:00 PM
0
David A. Black wrote:
> Hi --
>
> On Thu, 17 Jul 2008, Alfonso Caponi wrote:
>
>>
>> Can you help me please?
>> Thank you very much
>
> It looks like the error is in the part of the script where you're
> connecting to hosts, since it's in the net code.
>
>
> David
This is the complete error:
/usr/lib/ruby/1.8/net/protocol.rb:133:in `sysread': end of file reached
(EOFError)
from /usr/lib/ruby/1.8/net/protocol.rb:133:in `rbuf_fill'
from /usr/lib/ruby/1.8/timeout.rb:56:in `timeout'
from /usr/lib/ruby/1.8/timeout.rb:76:in `timeout'
from /usr/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'
from /usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
from /usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'
from /usr/lib/ruby/1.8/net/http.rb:1988:in `read_status_line'
from /usr/lib/ruby/1.8/net/http.rb:1977:in `read_new'
... 6 levels...
from /usr/lib/ruby/1.8/timeout.rb:56:in `timeout'
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
sysread error
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password