Fix #1242291 [ValueError:min() arg is an empty sequence](https://bugs.launchpad.net/calibre/+bug/1242291)