dsnopek / anki-sync-server

A personal Anki sync server (so you can sync against your own server rather than AnkiWeb)
GNU Affero General Public License v3.0
744 stars 95 forks source link

Looks like there is a "self." missing. #10

Closed ospalh closed 10 years ago

ospalh commented 10 years ago

Hi. I think i spotted a typo. It said self.base_url = base_url + '/', but there was no local variable base_url anywhere.

In the end i changed this in a slightly different way. str.endswith() works on empty strings, so there is no real need for the if and elif.

I have also configured my Emacs so that it removes trailing whitespace on every save. I've put that in an extra commit.

I am not sure how you handle pull requests. Maybe you just want to change line 313 and add the missing self.. Anyway, i thought i should mention this. Regards, ospalh

dsnopek commented 10 years ago

Thanks! I think you're right about the self bit - it's a sign that this needs more unit test coverage. :-) I've also merged your trailing spaces commit - there's no other branches/patches it could break, I don't think.

Thanks again! David.