Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
00d68a2f
Commit
00d68a2f
authored
Mar 29, 2016
by
Federico G. Schwindt
Committed by
Lasse Karstensen
May 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct ParseError output
parent
654b7e97
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
vmodtool.py
lib/libvcc/vmodtool.py
+5
-5
No files found.
lib/libvcc/vmodtool.py
View file @
00d68a2f
...
@@ -151,7 +151,7 @@ class Token(object):
...
@@ -151,7 +151,7 @@ class Token(object):
class
Vmod
(
object
):
class
Vmod
(
object
):
def
__init__
(
self
,
nam
,
dnam
,
sec
):
def
__init__
(
self
,
nam
,
dnam
,
sec
):
if
not
is_c_name
(
nam
):
if
not
is_c_name
(
nam
):
raise
ParseError
(
"Module name '
%
s' is illegal"
,
nam
)
raise
ParseError
(
"Module name '
%
s' is illegal"
%
nam
)
self
.
nam
=
nam
self
.
nam
=
nam
self
.
dnam
=
dnam
self
.
dnam
=
dnam
self
.
sec
=
sec
self
.
sec
=
sec
...
@@ -163,10 +163,10 @@ class Vmod(object):
...
@@ -163,10 +163,10 @@ class Vmod(object):
def
set_event
(
self
,
nam
):
def
set_event
(
self
,
nam
):
if
self
.
event
!=
None
:
if
self
.
event
!=
None
:
raise
ParseError
(
"Module
%
s already has $Event"
,
raise
ParseError
(
"Module
%
s already has $Event"
%
self
.
nam
)
self
.
nam
)
if
not
is_c_name
(
nam
):
if
not
is_c_name
(
nam
):
raise
ParseError
(
"$Event name '
%
s' is illegal"
,
nam
)
raise
ParseError
(
"$Event name '
%
s' is illegal"
%
nam
)
self
.
event
=
nam
self
.
event
=
nam
def
add_func
(
self
,
fn
):
def
add_func
(
self
,
fn
):
...
@@ -686,11 +686,11 @@ def parse_func(tl, rt_type=None, pobj=None):
...
@@ -686,11 +686,11 @@ def parse_func(tl, rt_type=None, pobj=None):
if
pobj
!=
None
and
fname
[
0
]
==
"."
and
is_c_name
(
fname
[
1
:]):
if
pobj
!=
None
and
fname
[
0
]
==
"."
and
is_c_name
(
fname
[
1
:]):
fname
=
pobj
+
fname
fname
=
pobj
+
fname
elif
not
is_c_name
(
fname
):
elif
not
is_c_name
(
fname
):
raise
ParseError
(
"Function name '
%
s' is illegal"
,
fname
)
raise
ParseError
(
"Function name '
%
s' is illegal"
%
fname
)
t
=
tl
.
get_token
()
t
=
tl
.
get_token
()
if
t
.
str
!=
"("
:
if
t
.
str
!=
"("
:
raise
ParseError
(
"Expected
\"
(
\"
got
\"
%
s
\"
"
,
t
.
str
)
raise
ParseError
(
"Expected
\"
(
\"
got
\"
%
s
\"
"
%
t
.
str
)
while
True
:
while
True
:
t
=
parse_arg
(
tl
,
al
)
t
=
parse_arg
(
tl
,
al
)
...
...
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