Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
23c2bbf5
Commit
23c2bbf5
authored
May 23, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor code cleanups
parent
bdc95095
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
Cython/Compiler/Errors.py
Cython/Compiler/Errors.py
+7
-2
No files found.
Cython/Compiler/Errors.py
View file @
23c2bbf5
...
...
@@ -157,10 +157,11 @@ def report_error(err):
try
:
echo_file
.
write
(
line
)
except
UnicodeEncodeError
:
echo_file
.
write
(
line
.
encode
(
'ASCII'
,
'replace'
))
num_errors
=
num_errors
+
1
num_errors
+=
1
if
Options
.
fast_fail
:
raise
AbortError
(
"fatal errors"
)
def
error
(
position
,
message
):
#print "Errors.error:", repr(position), repr(message) ###
if
position
is
None
:
...
...
@@ -170,7 +171,9 @@ def error(position, message):
report_error
(
err
)
return
err
LEVEL
=
1
# warn about all errors level 1 or higher
LEVEL
=
1
# warn about all errors level 1 or higher
def
message
(
position
,
message
,
level
=
1
):
if
level
<
LEVEL
:
...
...
@@ -183,6 +186,7 @@ def message(position, message, level=1):
echo_file
.
write
(
line
)
return
warn
def
warning
(
position
,
message
,
level
=
0
):
if
level
<
LEVEL
:
return
...
...
@@ -196,6 +200,7 @@ def warning(position, message, level=0):
echo_file
.
write
(
line
)
return
warn
_warn_once_seen
=
{}
def
warn_once
(
position
,
message
,
level
=
0
):
if
level
<
LEVEL
or
message
in
_warn_once_seen
:
...
...
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