mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-27 10:17:27 +01:00
pep8
This commit is contained in:
parent
d329202ec6
commit
b7d88ff218
1 changed files with 7 additions and 8 deletions
|
|
@ -187,8 +187,8 @@ def update(self):
|
|||
dirty_text = '%s' % db.dirty_queue_length()
|
||||
except:
|
||||
dirty_text = _('none')
|
||||
self.msg.setText('<p>' +
|
||||
_('Book metadata files remaining to be written: %s') % dirty_text)
|
||||
self.msg.setText('<p>' + _(
|
||||
'Book metadata files remaining to be written: %s') % dirty_text)
|
||||
QTimer.singleShot(1000, self.update)
|
||||
|
||||
def mark_all_dirty(self):
|
||||
|
|
@ -398,8 +398,9 @@ def rename_requested(self, name, location):
|
|||
base = os.path.dirname(loc)
|
||||
old_name = name.replace('&&', '&')
|
||||
newname, ok = QInputDialog.getText(self.gui, _('Rename') + ' ' + old_name,
|
||||
'<p>'+_('Choose a new name for the library <b>%s</b>. ')%name +
|
||||
'<p>'+_('Note that the actual library folder will be renamed.'),
|
||||
'<p>'+_(
|
||||
'Choose a new name for the library <b>%s</b>. ')%name + '<p>'+_(
|
||||
'Note that the actual library folder will be renamed.'),
|
||||
text=old_name)
|
||||
newname = sanitize_file_name_unicode(unicode(newname))
|
||||
if not ok or not newname or newname == old_name:
|
||||
|
|
@ -409,8 +410,7 @@ def rename_requested(self, name, location):
|
|||
return error_dialog(self.gui, _('Already exists'),
|
||||
_('The folder %s already exists. Delete it first.') %
|
||||
newloc, show=True)
|
||||
if (iswindows and len(newloc) >
|
||||
LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT):
|
||||
if (iswindows and len(newloc) > LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT):
|
||||
return error_dialog(self.gui, _('Too long'),
|
||||
_('Path to library too long. Must be less than'
|
||||
' %d characters.')%LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT,
|
||||
|
|
@ -470,8 +470,7 @@ def restore_database(self):
|
|||
LibraryDatabase = db_class()
|
||||
m = self.gui.library_view.model()
|
||||
db = m.db
|
||||
if (iswindows and len(db.library_path) >
|
||||
LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT):
|
||||
if (iswindows and len(db.library_path) > LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT):
|
||||
return error_dialog(self.gui, _('Too long'),
|
||||
_('Path to library too long. Must be less than'
|
||||
' %d characters. Move your library to a location with'
|
||||
|
|
|
|||
Loading…
Reference in a new issue