Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Alasdair
blawiki
Merge requests
!6
Remove check for negative index as it's already handled from the parser of args
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Phil Burton
requested to merge
FBeans/wikiquery:master
into
master
4 years ago
Overview
0
Commits
2
Changes
1
0
0
Compare
master
version 1
fea55856
4 years ago
master (base)
and
latest version
latest version
6aa1ba47
2 commits,
4 years ago
version 1
fea55856
1 commit,
4 years ago
1 file
+
2
−
6
Expand all files
Preferences
Preferences
File browser
List view
Tree view
Compare changes
Inline
Side-by-side
Show whitespace changes
Show one file at a time
wikiquery
+
2
−
6
Options
View file @ 6aa1ba47
Edit in single-file editor
Open in Web IDE
Show full file
@@ -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
)
Menu
Explore
Projects
Groups
Topics
Snippets