PEP8 happiness

This commit is contained in:
Gergely Polonkai 2016-05-24 23:17:15 +02:00
parent 18b31f0294
commit 14dfcc6a71

View File

@ -10,6 +10,7 @@ usage: zim --plugin linklist [OPTIONS] <notebook>
--missing-only List only pages that don't exist
'''
class LinkListPlugin(PluginClass):
plugin_info = {
'name': 'Link List',
@ -17,6 +18,7 @@ class LinkListPlugin(PluginClass):
'author': 'Gergely Polonkai',
}
class LinkListCommand(Command):
options = (
('help', 'h', 'Print this help text and exit'),
@ -38,10 +40,11 @@ class LinkListCommand(Command):
return
nbi = None
if len(self.args) > 0:
nbi = resolve_notebook(self.args[0])
if nbi == None:
if nbi is None:
print("Notebook must be specified!")
return
@ -64,5 +67,8 @@ class LinkListCommand(Command):
for page in self._all_links():
exists = page.exists()
if listing == None or (listing == 'M' and exists == 0) or (listing == 'E' and exists == 1):
if listing is None or \
(listing == 'M' and exists == 0) or \
(listing == 'E' and exists == 1):
print "%c %s" % ('E' if exists == 1 else 'M', page.name)