Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetLoc objects not sortable with Python3 #88

Closed
frlan opened this issue Sep 2, 2020 · 2 comments
Closed

NetLoc objects not sortable with Python3 #88

frlan opened this issue Sep 2, 2020 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@frlan
Copy link
Member

frlan commented Sep 2, 2020

When trying to sort a list of NetLoc objects I'm getting

'<' not supported between instances of 'NetLoc' and 'NetLoc'

As I workaround I've converted it to str

self.servers = sorted(self.require('backend'), key=lambda c: str(c.address.connect))

@ctheune
Copy link
Member

ctheune commented Dec 10, 2020

This is just to get a stable sorting, right?

@ctheune ctheune added the bug Something isn't working label Dec 10, 2020
@ctheune ctheune added this to the batou 2.3 milestone Dec 10, 2020
@frlan
Copy link
Member Author

frlan commented Dec 11, 2020

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants