rasguanabana / ytfs

YouTube File System
MIT License
1.1k stars 45 forks source link

Fix unorderable types error between str and int #21

Closed JelteF closed 8 years ago

JelteF commented 8 years ago

When looking at implementing easyfuse I ran into a problem right away. The sorted function was complaining about different types of things and I was unable to open any of the awesome Rick Astley videos.

With this change I'm able to open files, but when looking at the debug output it now gives a ValueError saying "Your tuples are wrong :(". I'm not sure if this is related, but this fix at least fixes the ordering.

rasguanabana commented 8 years ago

Thank you for pointing the problem. I changed -1 to float('inf'), so that elements with unknown filesizes will go at the end of the list.