metabrainz/geordi — pull request #14 by ianmcorvidae (2014-07-01 23:09:17+00:00)
Title: Ignore empty catalogue numbers in ninjatune data, don't error out with old-style catno format

Just a bit of dealing with the fact ninjatune comes in not one, but *two* xls formats (different headers). python, seeing `data.get(x, y)`, predictably evaluates both x and y, so it was causing a `KeyError` even when x was a key in `data`.

I'm also telling it to to outright skip rows that don't have a catalogue number. Before it would have imported them as `ninjatune/release/` which is a bit confusing. Possibly could be fixed in the future to do something else. Dunno. This bit applies to the old-format data, which is one giant file that includes ~20k rows for all their historical stuff as of about a year ago.