Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
d5356666
Commit
d5356666
authored
Dec 03, 2007
by
Tiago Peixoto
Browse files
Properly parse command line options with empty arguments, eg. "foo||bar"
parent
4a3e0468
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph-tool
View file @
d5356666
...
...
@@ -150,7 +150,7 @@ def _main():
"""this parses the command line argument in 'arg' and calls the
underlying function"""
# Parameter regexp
p
=
re
.
compile
(
r
"((('[^']*')|(\"[^\"']*\"))|([^\|]+)|(^(?=[^$]))(?=\||$))"
)
p
=
re
.
compile
(
r
"((('[^']*')|(\"[^\"']*\"))|([^\|]+)|(
\B)|(
^(?=[^$]))(?=\||$))"
)
if
arg
==
None
:
arg
=
""
values
=
[
x
[
0
].
strip
()
for
x
in
p
.
findall
(
arg
)]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment