changeset 373:49953d5cef0f

linksfrom/linksto: Fix broken command.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 24 Sep 2015 20:34:54 -0700
parents d379a6a601b1
children f5b7f035bef9
files wikked/commands/query.py
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/wikked/commands/query.py	Thu Sep 24 20:33:30 2015 -0700
+++ b/wikked/commands/query.py	Thu Sep 24 20:34:54 2015 -0700
@@ -13,7 +13,8 @@
         self.description = "Lists page names in the wiki."
 
     def setupParser(self, parser):
-        parser.add_argument('--fs',
+        parser.add_argument(
+                '--fs',
                 help="Lists pages by scanning the file-system directly",
                 action='store_true')
 
@@ -89,12 +90,13 @@
         self.description = "Gets the links going out from a given page."
 
     def setupParser(self, parser):
-        parser.add_argument('url',
+        parser.add_argument(
+                'url',
                 help="The page from which the links come from",
                 nargs=1)
 
     def run(self, ctx):
-        page = ctx.wiki.getPage(ctx.args.url)
+        page = ctx.wiki.getPage(ctx.args.url[0])
         for l in page.links:
             logger.info(l)
 
@@ -107,12 +109,13 @@
         self.description = "Gets the links going to a given page."
 
     def setupParser(self, parser):
-        parser.add_argument('url',
+        parser.add_argument(
+                'url',
                 help="The page to which the links go to",
                 nargs=1)
 
     def run(self, ctx):
-        page = ctx.wiki.getPage(ctx.args.url)
+        page = ctx.wiki.getPage(ctx.args.url[0])
         for l in page.getIncomingLinks():
             logger.info(l)