Python/pep8: fix E711 in wizards/../web module
Change-Id: I1efbf6ed09cefb5d69ac615d77cfee7eff6383f2
This commit is contained in:
@@ -56,7 +56,7 @@ class BackgroundsDialog(ImageListDialog):
|
||||
def other(self):
|
||||
filename = self.sd.callOpenDialog(
|
||||
False, self.settings.cp_DefaultSession.cp_InDirectory)
|
||||
if filename != None and filename.length > 0 and filename[0] != None:
|
||||
if filename is not None and filename.length > 0 and filename[0] is not None:
|
||||
self.settings.cp_DefaultSession.cp_InDirectory = \
|
||||
FileAccess.getParentDir(filename[0])
|
||||
i = add(filename[0])
|
||||
@@ -107,7 +107,7 @@ class BackgroundsDialog(ImageListDialog):
|
||||
self.cut = cut_
|
||||
|
||||
def getImageUrls(self, listItem):
|
||||
if listItem != None:
|
||||
if listItem is not None:
|
||||
sRetUrls = range(1)
|
||||
sRetUrls[0] = listItem
|
||||
return sRetUrls
|
||||
|
@@ -61,7 +61,7 @@ class IconsDialog(ImageListDialog):
|
||||
self.build()
|
||||
|
||||
def getIconset(self):
|
||||
if getSelected() == None:
|
||||
if getSelected() is None:
|
||||
return None
|
||||
else:
|
||||
return self.set.getKey((getSelected()) / len(self.icons))
|
||||
@@ -91,7 +91,7 @@ class IconsDialog(ImageListDialog):
|
||||
return sRetUrls
|
||||
|
||||
def render(self, object):
|
||||
if object == None:
|
||||
if object is None:
|
||||
return ""
|
||||
|
||||
i = (object).intValue()
|
||||
|
@@ -340,7 +340,7 @@ class WWD_Events(WWD_Startup):
|
||||
'''
|
||||
|
||||
def setBackground(self, background):
|
||||
if background == None:
|
||||
if background is None:
|
||||
background = ""
|
||||
|
||||
WWD_Startup.settings.cp_DefaultSession.cp_Design.cp_BackgroundImage \
|
||||
@@ -390,7 +390,7 @@ class WWD_Events(WWD_Startup):
|
||||
updates the ui....
|
||||
'''
|
||||
def setPublishUrl(self, publisher, url, number):
|
||||
if url == None:
|
||||
if url is None:
|
||||
return None
|
||||
|
||||
p = getPublisher(publisher)
|
||||
@@ -465,7 +465,7 @@ class WWD_Events(WWD_Startup):
|
||||
|
||||
def documentPreview(self):
|
||||
try:
|
||||
if self.docPreview == None:
|
||||
if self.docPreview is None:
|
||||
self.docPreview = TOCPreview(
|
||||
self.xMSF, settings, resources,
|
||||
stylePreview.tempDir, myFrame)
|
||||
@@ -653,7 +653,7 @@ class WWD_Events(WWD_Startup):
|
||||
# first I check if a session with the given name exists
|
||||
try:
|
||||
node = Configuration.getNode(name, conf)
|
||||
if node != None:
|
||||
if node is not None:
|
||||
if not AbstractErrorHandler.showMessage(
|
||||
self.xMSF, self.xUnoDialog.Peer,
|
||||
resources.resSessionExists.replace("${NAME}", name),
|
||||
@@ -755,7 +755,7 @@ class WWD_Events(WWD_Startup):
|
||||
'''
|
||||
p = getPublisher(FTP_PUBLISHER)
|
||||
# if ftp is checked, and no proxies are set, and password is empty...
|
||||
if p.cp_Publish and not proxies and p.password == None or \
|
||||
if p.cp_Publish and not proxies and p.password is None or \
|
||||
p.password == "":
|
||||
if showFTPDialog(p):
|
||||
updatePublishUI(2)
|
||||
|
@@ -721,7 +721,7 @@ class WebWizardDialog(WizardDialog):
|
||||
|
||||
def getImageUrls(self, listItem):
|
||||
oResIds = None
|
||||
if listItem != None:
|
||||
if listItem is not None:
|
||||
oResIds = listItem.getImageUrls()
|
||||
|
||||
return oResIds
|
||||
|
@@ -110,7 +110,7 @@ class CGDocument(ConfigGroup):
|
||||
#task.advance(True)
|
||||
#4
|
||||
#now use the object to read some document properties.
|
||||
if xProps != None:
|
||||
if xProps is not None:
|
||||
title = xProps.Title
|
||||
description = xProps.Description
|
||||
author = xProps.Author
|
||||
@@ -138,7 +138,7 @@ class CGDocument(ConfigGroup):
|
||||
if self.cp_Author == "":
|
||||
cp_Author = self.author
|
||||
|
||||
if self.cp_Exporter == None or self.cp_Exporter == "":
|
||||
if self.cp_Exporter is None or self.cp_Exporter == "":
|
||||
cp_Exporter = \
|
||||
self.root.cp_Exporters.getKey(self.root.getExporters(CGDocument.appType))
|
||||
|
||||
@@ -197,13 +197,13 @@ class CGDocument(ConfigGroup):
|
||||
d.cp_DisplayFormatIcon ? getIcon(exp) : "", self.dirName, self.urlFilename])'''
|
||||
|
||||
def updateDate(self):
|
||||
if self.updateDate == None:
|
||||
if self.updateDate is None:
|
||||
return ""
|
||||
|
||||
return getSettings().formatter.formatCreated(self.updateDate)
|
||||
|
||||
def createDate(self):
|
||||
if self.createDate == None:
|
||||
if self.createDate is None:
|
||||
return ""
|
||||
|
||||
return getSettings().formatter.formatCreated(self.createDate)
|
||||
@@ -272,7 +272,7 @@ class CGDocument(ConfigGroup):
|
||||
'''
|
||||
|
||||
def getExporterIndex(self):
|
||||
if self.cp_Exporter == None:
|
||||
if self.cp_Exporter is None:
|
||||
return 0
|
||||
|
||||
exporter = getSettings().cp_Exporters.getElement(self.cp_Exporter)
|
||||
|
Reference in New Issue
Block a user