Dont barf when there are no formats available.

This commit is contained in:
Kovid Goyal 2007-09-24 00:38:16 +00:00
parent 90d0629997
commit 126a8771fe
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,8 @@ class LRFSingleDialog(QDialog, Ui_LRFSingleDialog):
self.changed = False self.changed = False
self.read_saved_options() self.read_saved_options()
self.initialize_metadata() self.initialize_metadata()
formats = [i.upper() for i in self.db.formats(self.row).split(',')] formats = self.db.formats(self.row)
formats = [i.upper() for i in formats.split(',')] if formats else []
try: try:
formats.remove(self.output_format) formats.remove(self.output_format)
except ValueError: except ValueError:

View File

@ -12,7 +12,6 @@
## You should have received a copy of the GNU General Public License along ## You should have received a copy of the GNU General Public License along
## with this program; if not, write to the Free Software Foundation, Inc., ## with this program; if not, write to the Free Software Foundation, Inc.,
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from libprs500 import __appname__
''' '''
Backend that implements storage of ebooks in an sqlite database. Backend that implements storage of ebooks in an sqlite database.
''' '''