use of sort method incompatible with python 2.3

Bug #136437 reported by Jon Slavin
4
Affects Status Importance Assigned to Milestone
paramiko
Fix Released
Medium
Robey Pointer

Bug Description

in sftp_file.py line 92:
        k.sort(cmp=lambda x, y: cmp(x[0], y[0]))
uses the sort method in the list k in a manner (with a keyword argument) that is not compatible with python 2.3.x. The simple fix that is compatible with current versions of python is to simply make it:
        k.sort(lambda x, y: cmp(x[0], y[0]))
(Of course people should probably update to a more python version, but you do state that paramiko is compatible with python 2.3 and higher.)

Revision history for this message
Robey Pointer (robey) wrote : Re: [Bug 136437] use of sort method incompatible with python 2.3

On 31 Aug 2007, at 10:20, Jon Slavin wrote:

> Public bug reported:
>
> in sftp_file.py line 92:
> k.sort(cmp=lambda x, y: cmp(x[0], y[0]))
> uses the sort method in the list k in a manner (with a keyword
> argument) that is not compatible with python 2.3.x. The simple fix
> that is compatible with current versions of python is to simply
> make it:
> k.sort(lambda x, y: cmp(x[0], y[0]))
> (Of course people should probably update to a more python version,
> but you do state that paramiko is compatible with python 2.3 and
> higher.)

Thanks! Patch committed.

robey

Robey Pointer (robey)
Changed in paramiko:
assignee: nobody → robey
importance: Undecided → Medium
status: New → Fix Committed
Robey Pointer (robey)
Changed in paramiko:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.