diff --git a/src/calibre/ebooks/mobi/reader.py b/src/calibre/ebooks/mobi/reader.py index 41e6cb8417..a3aa5b7ae7 100644 --- a/src/calibre/ebooks/mobi/reader.py +++ b/src/calibre/ebooks/mobi/reader.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal ' ''' @@ -206,7 +206,8 @@ class MobiReader(object): ref['href'] = os.path.basename(htmlfile)+ref['href'] except AttributeError: pass - open(htmlfile, 'wb').write(unicode(soup).encode('utf8')) + with open(htmlfile, 'wb') as f: + f.write(unicode(soup).encode('utf8')) self.htmlfile = htmlfile if self.book_header.exth is not None: diff --git a/src/calibre/gui2/dialogs/config.py b/src/calibre/gui2/dialogs/config.py index e5a71a0f8b..c4e673c8b8 100644 --- a/src/calibre/gui2/dialogs/config.py +++ b/src/calibre/gui2/dialogs/config.py @@ -43,10 +43,6 @@ class ConfigDialog(QDialog, Ui_Dialog): self.directory_list.addItems(dirs) self.connect(self.add_button, SIGNAL('clicked(bool)'), self.add_dir) self.connect(self.remove_button, SIGNAL('clicked(bool)'), self.remove_dir) - self.priority.addItem('Normal') - self.priority.addItem('Low') - self.priority.addItem('Lowest') - self.priority.addItem('Idle') if not islinux: self.dirs_box.setVisible(False) diff --git a/src/calibre/gui2/dialogs/config.ui b/src/calibre/gui2/dialogs/config.ui index 7faa38e715..776855fa7c 100644 --- a/src/calibre/gui2/dialogs/config.ui +++ b/src/calibre/gui2/dialogs/config.ui @@ -72,7 +72,7 @@ - 1 + 0 @@ -163,19 +163,6 @@ - - - &Priority for conversion jobs: - - - priority - - - - - - - Default network &timeout: @@ -185,7 +172,7 @@ - + Set the default timeout for network fetches (i.e. anytime we go out to the internet to get information) @@ -204,10 +191,10 @@ - + - + Choose &language (requires restart):