summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwikiquery8
1 files changed, 2 insertions, 6 deletions
diff --git a/wikiquery b/wikiquery
index 47233e3..d133ac1 100755
--- a/wikiquery
+++ b/wikiquery
@@ -12,7 +12,7 @@ version = "0.1.7"
def stringify(o):
if isinstance(o, list):
output = []
- for i, item in enumerate(o, 1):
+ for i, item in enumerate(o, 0):
output.append("%s: %s" % (i, item))
return ' %s' % ', '.join(output)
@@ -89,11 +89,7 @@ def main():
while len(args) > 0 and not(args[0].isdigit()):
topic += " " + args.pop(0)
- index = int(args.pop(0)) -1 if args else None
-
- if index < 1:
- print ("Cannot search for index < 1")
- sys.exit(0)
+ index = int(args.pop(0)) if args else None
if options.search:
search(topic, index)