[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: twisted: problem with sftp-client

exarkun

1/23/2008 3:31:00 PM

On Wed, 23 Jan 2008 15:43:47 +0100, Kristian Domke <news@neither-nor.net> wrote:
>Hello Folks,
>
>I don't know, if it is ok to post large portions of code, but I have
>really no idea where the problem lies, so I don't have much of a choice.
>
>I am programming a tool, which in the end shall connect to an
>sftp-server, take the list of files in a specified directory, searches
>for some special names and mailes them to different persons.
>
>I am only at the start at the moment. As orientation I use the cftp.py
>programm from twisted.conch with some alterations because of not having
>userinteraction.
>
>At its current state the programm should do nothing but getting the
>listing of files from a server. It works fine with the cfto.py, so the
>server is ok.
>
>But while the cftp.py script gets 'files' as an exceptions.EOFError
>exeption in the StdioClient._cbReadFile at the end of the listing, I
>just get another list and run into wall (aka Traceback):
>
>> 2008/01/23 16:14 +0200 [SSHChannel session (0) on SSHService
>> ssh-connection on SimpleTransport,client] Unhandled Error
>> Traceback (most recent call last):
>> File "/usr/lib/python2.5/site-packages/twisted/python/log.py", >
>line 48, in callWithLogger
>> return callWithContext({"system": lp}, func, *args, **kw)
>> File "/usr/lib/python2.5/site-packages/twisted/python/log.py", >
>line 33, in callWithContext
>> return context.call({ILogContext: newCtx}, func, *args,
>> **kw)
>> File
>> "/usr/lib/python2.5/site-packages/twisted/python/context.py", line 59,
>> in callWithContext
>> return self.currentContext().callWithContext(ctx, func,
>> *args, **kw)
>> File
>> "/usr/lib/python2.5/site-packages/twisted/python/context.py", line 37,
>> in callWithContext
>> return func(*args,**kw)
>> --- <exception caught here> ---
>> File
>> "/usr/lib/python2.5/site-packages/twisted/conch/ssh/filetransfer.py",
>> line 52, in dataReceived
>> f(data)
>> File
>> "/usr/lib/python2.5/site-packages/twisted/conch/ssh/filetransfer.py",
>> line 694, in packet_STATUS
>> msg, data = getNS(data)
>> File
>> "/usr/lib/python2.5/site-packages/twisted/conch/ssh/common.py", line
>> 39, in getNS
>> l, = struct.unpack('!L',s[c:c+4])
>> File "struct.py", line 87, in unpack
>> return o.unpack(s)
>> struct.error: unpack requires a string argument of length 4
>
>
>I have no Idea, and hope here is someone who can help me.
>
>Kristian
>
> [snip]
>
> def _cbOpenList(self, directory):
> files = []
> log.msg('direc.:%s' % str(directory))
> log.msg('direc.:%s' % type(directory))
> log.msg('direc.:%s' % str(directory.parent))
> log.msg('direc.:%s' % type(directory.parent))
> d = directory.read()
> d.addCallback(self._cbReadFile, files, directory)
> d.addErrback(self._ebRaeadFile, files, directory)

You typo'd the errback method name above. This doesn't cause the problem
you're having, though.

There appears to be a bug in FX_EOF handling in filetransfer.py which
results in the problem you see. It's not completely clear to me why
cftp.py doesn't encounter the same issue. I filed #3009 in the Twisted
issue tracker for this problem. I twiddled the source a bit and seem to
have fixed it, so I think the issue should be easily resolvable. If you
want, you can help out with this by writing unit tests for the issue and
submitting a patch.

Contributing to Twisted is described on this page:

http://twistedmatrix.com/trac/wiki/TwistedD...

Jean-Paul
10 Answers

sheldonlg

10/9/2013 6:57:00 PM

0

On 09/10/2013 14:32, nannadvora@gmail.com wrote:
> THIS ARTICLE MADE ME SO SAD JAY-- HE WAS SO MUCH MORE THAN HIS PARTY-
> I HOPE YOU HAVE BEEN WELL---- DVORA

Unfortunately for his remembrance, the politics is the legacy that will
be emphasized -- and rightly so IMO.

--
Shelly

Harry Weiss

10/14/2013 12:57:00 AM

0

Shelly <sheldonlg@thevillages.net> wrote:
> On 09/10/2013 14:32, nannadvora@gmail.com wrote:
> > THIS ARTICLE MADE ME SO SAD JAY-- HE WAS SO MUCH MORE THAN HIS PARTY-
> > I HOPE YOU HAVE BEEN WELL---- DVORA

> Unfortunately for his remembrance, the politics is the legacy that will
> be emphasized -- and rightly so IMO.

> --
> Shelly

In most cases his religious writing will be studied for many many years.
His politics will be forgotten very shortly.


--
Harry J. Weiss
hjweiss@panix.com

sheldonlg

10/14/2013 1:06:00 AM

0

On 13/10/2013 20:57, Harry Weiss wrote:
> His politics will be forgotten very shortly.

From your lips......

--
Shelly

Higgs Boson

10/14/2013 7:37:00 PM

0

On Sunday, October 13, 2013 6:05:31 PM UTC-7, shel...@thevillages.net wrote:
> On 13/10/2013 20:57, Harry Weiss wrote:
>
> > His politics will be forgotten very shortly.
>
>
>
> From your lips......
>
I doubt it. The government simply doesn't have the means to control the fanatics who were among those persons rallying several days in a row after his death. Rabbis & other prestigious figures made overt statements that they would not allow their people to be drafted.

This is a LOT more serious than wishful thinking can solve.

Giborah

JJ

10/14/2013 7:47:00 PM

0

"Giborah" <hypatia08@gmail.com> wrote in message
news:7cabcac8-ab1f-4318-b625-6483dfc1f45c@googlegroups.com...
On Sunday, October 13, 2013 6:05:31 PM UTC-7, shel...@thevillages.net wrote:
> On 13/10/2013 20:57, Harry Weiss wrote:
>
> > His politics will be forgotten very shortly.
>
>
>
> From your lips......
>
I doubt it. The government simply doesn't have the means to control the
fanatics who were among those persons rallying several days in a row after
his death. Rabbis & other prestigious figures made overt statements that
they would not allow their people to be drafted.

This is a LOT more serious than wishful thinking can solve.

Giborah

******************************

I agree. Shas is not "politics as usual". They will continue to resist the
military draft and continue to study rather than work and continue to demand
extra privileges. And it's still the No. 1 party in Israel whose politicians
have served time in prison for monetary offenses.

Jay




yzk

10/14/2013 8:57:00 PM

0

On Monday, October 14, 2013 10:46:45 PM UTC+3, JJ wrote:
> "Giborah" <hypatia08@gmail.com> wrote in message
>
> news:7cabcac8-ab1f-4318-b625-6483dfc1f45c@googlegroups.com...
>
> On Sunday, October 13, 2013 6:05:31 PM UTC-7, shel...@thevillages.net wrote:
>
> > On 13/10/2013 20:57, Harry Weiss wrote:
>
> >
>
> > > His politics will be forgotten very shortly.
>
> >
>
> >
>
> >
>
> > From your lips......
>
> >
>
> I doubt it. The government simply doesn't have the means to control the
>
> fanatics who were among those persons rallying several days in a row after
>
> his death. Rabbis & other prestigious figures made overt statements that
>
> they would not allow their people to be drafted.
>
>
>
> This is a LOT more serious than wishful thinking can solve.
>
>
>
> Giborah
>
>
>
> ******************************
>
>
>
> I agree. Shas is not "politics as usual". They will continue to resist the
>
> military draft and continue to study rather than work and continue to demand
>
> extra privileges. And it's still the No. 1 party in Israel whose politicians
>
> have served time in prison for monetary offenses.
>
>
>
> Jay

SO LET THEM GO TO JAIL!!!

yzk in Y-m

JJ

10/14/2013 9:13:00 PM

0

"yzk" <yaaqovk@gmail.com> wrote in message
news:cdbeee27-0551-449c-9e2b-a002db485e7c@googlegroups.com...
> On Monday, October 14, 2013 10:46:45 PM UTC+3, JJ wrote:
>> "Giborah" <hypatia08@gmail.com> wrote in message
>>
>> news:7cabcac8-ab1f-4318-b625-6483dfc1f45c@googlegroups.com...
>>
>> On Sunday, October 13, 2013 6:05:31 PM UTC-7, shel...@thevillages.net
>> wrote:
>>
>> > On 13/10/2013 20:57, Harry Weiss wrote:
>>
>> >
>>
>> > > His politics will be forgotten very shortly.
>>
>> >
>>
>> >
>>
>> >
>>
>> > From your lips......
>>
>> >
>>
>> I doubt it. The government simply doesn't have the means to control the
>>
>> fanatics who were among those persons rallying several days in a row
>> after
>>
>> his death. Rabbis & other prestigious figures made overt statements that
>>
>> they would not allow their people to be drafted.
>>
>>
>>
>> This is a LOT more serious than wishful thinking can solve.
>>
>>
>>
>> Giborah
>>
>>
>>
>> ******************************
>>
>>
>>
>> I agree. Shas is not "politics as usual". They will continue to resist
>> the
>>
>> military draft and continue to study rather than work and continue to
>> demand
>>
>> extra privileges. And it's still the No. 1 party in Israel whose
>> politicians
>>
>> have served time in prison for monetary offenses.
>>
>>
>>
>> Jay
>
> SO LET THEM GO TO JAIL!!!
>
> yzk in Y-m


They did. Don't you read the Israeli press?

Jay








yzk

10/14/2013 9:39:00 PM

0

On Monday, October 14, 2013 10:46:45 PM UTC+3, JJ wrote:
> "Giborah" <hypatia08@gmail.com> wrote in message
>
> news:7cabcac8-ab1f-4318-b625-6483dfc1f45c@googlegroups.com...
>
> On Sunday, October 13, 2013 6:05:31 PM UTC-7, shel...@thevillages.net wrote:
>
> > On 13/10/2013 20:57, Harry Weiss wrote:
>
> >
>
> > > His politics will be forgotten very shortly.
>
> >
>
> >
>
> >
>
> > From your lips......
>
> >
>
> I doubt it. The government simply doesn't have the means to control the
>
> fanatics who were among those persons rallying several days in a row after
>
> his death. Rabbis & other prestigious figures made overt statements that
>
> they would not allow their people to be drafted.
>
>
>
> This is a LOT more serious than wishful thinking can solve.
>
>
>
> Giborah
>
>
>
> ******************************
>
>
>
> I agree. Shas is not "politics as usual". They will continue to resist the
>
> military draft and continue to study rather than work and continue to demand
>
> extra privileges. And it's still the No. 1 party in Israel whose politicians
>
> have served time in prison for monetary offenses.
>
>
>
> Jay

SO LET THEM (THE DRAFT-RESISTING YESHIVA STUDENTS) GO TO JAIL!!!
Also, if instigation by rashei yeshivot can be proven, cutting off some funding /subsidies to their yeshivot wouldn't be a bad idea either.
yzk in Y-m

Harry Weiss

10/15/2013 1:23:00 AM

0

JJ <dmr1860@gmail.com> wrote:
> "Giborah" <hypatia08@gmail.com> wrote in message
> news:7cabcac8-ab1f-4318-b625-6483dfc1f45c@googlegroups.com...
> On Sunday, October 13, 2013 6:05:31 PM UTC-7, shel...@thevillages.net wrote:
> > On 13/10/2013 20:57, Harry Weiss wrote:
> >
> > > His politics will be forgotten very shortly.
> >
> >
> >
> > From your lips......
> >
> I doubt it. The government simply doesn't have the means to control the
> fanatics who were among those persons rallying several days in a row after
> his death. Rabbis & other prestigious figures made overt statements that
> they would not allow their people to be drafted.

> This is a LOT more serious than wishful thinking can solve.

> Giborah

> ******************************

> I agree. Shas is not "politics as usual". They will continue to resist the
> military draft and continue to study rather than work and continue to demand
> extra privileges. And it's still the No. 1 party in Israel whose politicians
> have served time in prison for monetary offenses.

> Jay


Al that is saying is that Olmert and cronies have better proteksiala


--
Harry J. Weiss
hjweiss@panix.com

JJ

10/15/2013 2:49:00 AM

0

"Harry Weiss" <hjweiss@panix.com> wrote in message
news:l3i55f$hjl$1@reader1.panix.com...
> JJ <dmr1860@gmail.com> wrote:
>> "Giborah" <hypatia08@gmail.com> wrote in message
>> news:7cabcac8-ab1f-4318-b625-6483dfc1f45c@googlegroups.com...
>> On Sunday, October 13, 2013 6:05:31 PM UTC-7, shel...@thevillages.net
>> wrote:
>> > On 13/10/2013 20:57, Harry Weiss wrote:
>> >
>> > > His politics will be forgotten very shortly.
>> >
>> >
>> >
>> > From your lips......
>> >
>> I doubt it. The government simply doesn't have the means to control the
>> fanatics who were among those persons rallying several days in a row
>> after
>> his death. Rabbis & other prestigious figures made overt statements that
>> they would not allow their people to be drafted.
>
>> This is a LOT more serious than wishful thinking can solve.
>
>> Giborah
>
>> ******************************
>
>> I agree. Shas is not "politics as usual". They will continue to resist
>> the
>> military draft and continue to study rather than work and continue to
>> demand
>> extra privileges. And it's still the No. 1 party in Israel whose
>> politicians
>> have served time in prison for monetary offenses.
>
>> Jay
>
>
> Al that is saying is that Olmert and cronies have better proteksiala
>
>
> --
> Harry J. Weiss
> hjweiss@panix.com


I disagree. Olmert was prosecuted vigorously, but was found not guilty. The
evidence simply was not there. And the evidence was made public. I don't
think the Israeli courts are that corrupt.

Jay