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