Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Net::SFTP does not catch errors

by idsfa (Vicar)
on Oct 01, 2003 at 03:12 UTC ( #295503=note: print w/replies, xml ) Need Help??


in reply to Net::SFTP does not catch errors

Yup, put() sure doesn't return a status. The pod nods in the direction of saying so, by not indicating any return value. The code confirms this, with no return values for the put function. The lower level commands such as do_write, however, do return a status. You may need to roll your own ...

$sfh = $sftp->do_open($target_file ...); . . . #loop over source file, reading blocks of $data $status = $sftp->do_write($sfh, $offset, $data) &bail_out($status) if ($status != SSH2_FX_OK); . . . $sftp->do_close($sfh);

In fact, this is pretty much exactly what the put() method does, but it discards the $status. Might have a patch to submit there ...


Remember, when you stare long into the abyss, you could have been home eating ice cream.

Replies are listed 'Best First'.
Re: Re: Net::SFTP does not catch errors
by mikedshelton (Beadle) on Dec 21, 2003 at 03:26 UTC
    bug reports submitted

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://295503]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2018-12-16 15:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many stories does it take before you've heard them all?







    Results (71 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!