rlhelinski/musicbrainz-catalog — pull request #15 by JonnyJD (2013-11-21 12:44:06+00:00)
Title: fix AssertionError on empty catalog

ProgressBar doesn't like having 0 as limit,
leading to an AssertionError:

```
Traceback (most recent call last):
File "catalog-cli.py", line 280, in
s = Shell()
File "catalog-cli.py", line 35, in __init__
self.c.load()
File "/home/jonnyjd/git/_musicbrainz/musicbrainz-catalog/mbcat/catalog.py", line 171, in load
for releaseId in self.loadReleaseIds():
File "/home/jonnyjd/git/_musicbrainz/musicbrainz-catalog/mbcat/catalog.py", line 134, in loadReleaseIds
pbar = progressbar.ProgressBar(widgets=widgets, maxval=len(fileList)).start()
File "/home/jonnyjd/git/_musicbrainz/musicbrainz-catalog/progressbar.py", line 261, in __init__
assert maxval > 0
AssertionError
```

Empty catalog does mean having an empty `release-id` directory. Putting any file (even an empty `blub.txt`) in this directory also prevents this error.
Starting users won't have any file in this folder.