mozilla-services / shavar

Tracking Protection update service for Firefox based on Safe Browsing protocol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect usage of str.split()

palant opened this issue · comments

The codebase contains statements like the following:

lname, chunklist = line.split(";", 2)

This particular example can be found here. Whoever wrote this seems to think that the second parameter to str.split() indicates the number of resulting string parts, like in JavaScript. However, in Python it's the maximum number of splits, so it should be line.split(";", 1).

Lots of instances. Fixed.