mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-29 10:07:08 +01:00
pep8
This commit is contained in:
parent
56afdebcf9
commit
ec45867a81
1 changed files with 7 additions and 8 deletions
|
|
@ -431,7 +431,8 @@ def initializePage(self):
|
|||
default = ac[2]
|
||||
if x.strip().endswith('@kindle.com'):
|
||||
accs.append((x, default))
|
||||
if default: has_default = True
|
||||
if default:
|
||||
has_default = True
|
||||
if has_default:
|
||||
accs = [x for x in accs if x[1]]
|
||||
if accs:
|
||||
|
|
@ -450,7 +451,8 @@ def commit(self):
|
|||
if (len(parts) >= 2 and parts[0] and self.send_email_widget.set_email_settings(True)):
|
||||
conf = smtp_prefs()
|
||||
accounts = conf.parse().accounts
|
||||
if not accounts: accounts = {}
|
||||
if not accounts:
|
||||
accounts = {}
|
||||
for y in accounts.values():
|
||||
y[2] = False
|
||||
accounts[x] = ['AZW, MOBI, TPZ, PRC, AZW1', True, True]
|
||||
|
|
@ -484,9 +486,9 @@ def commit(self):
|
|||
c = server_config()
|
||||
c.set('port', p)
|
||||
|
||||
|
||||
def set_port(self, *args):
|
||||
if not self.content_server.isChecked(): return
|
||||
if not self.content_server.isChecked():
|
||||
return
|
||||
import socket
|
||||
s = socket.socket()
|
||||
with closing(s):
|
||||
|
|
@ -518,8 +520,7 @@ def initializePage(self):
|
|||
self.manufacturer_view.setModel(self.man_model)
|
||||
previous = dynamic.get('welcome_wizard_device', False)
|
||||
if previous:
|
||||
previous = [x for x in get_devices() if \
|
||||
x.id == previous]
|
||||
previous = [x for x in get_devices() if x.id == previous]
|
||||
if not previous:
|
||||
previous = [Device]
|
||||
previous = previous[0]
|
||||
|
|
@ -841,7 +842,6 @@ def commit(self):
|
|||
pass
|
||||
|
||||
|
||||
|
||||
class Wizard(QWizard):
|
||||
|
||||
BUTTON_TEXTS = {
|
||||
|
|
@ -859,7 +859,6 @@ class Wizard(QWizard):
|
|||
_('&Finish')
|
||||
_('Commit')
|
||||
|
||||
|
||||
def __init__(self, parent):
|
||||
QWizard.__init__(self, parent)
|
||||
self.setWindowTitle(__appname__+' '+_('welcome wizard'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue