Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
405478c9
Commit
405478c9
authored
Mar 31, 2009
by
Tarek Ziadé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
using log.warn for sys.stderr
parent
48a18744
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
cmd.py
cmd.py
+2
-3
log.py
log.py
+7
-6
No files found.
cmd.py
View file @
405478c9
...
...
@@ -352,9 +352,8 @@ class Command:
# -- External world manipulation -----------------------------------
def
warn
(
self
,
msg
):
sys
.
stderr
.
write
(
"warning: %s: %s
\
n
"
%
(
self
.
get_command_name
(),
msg
))
log
.
warn
(
"warning: %s: %s
\
n
"
%
(
self
.
get_command_name
(),
msg
))
def
execute
(
self
,
func
,
args
,
msg
=
None
,
level
=
1
):
util
.
execute
(
func
,
args
,
msg
,
dry_run
=
self
.
dry_run
)
...
...
log.py
View file @
405478c9
...
...
@@ -18,13 +18,14 @@ class Log:
def
_log
(
self
,
level
,
msg
,
args
):
if
level
>=
self
.
threshold
:
if
not
args
:
# msg may contain a '%'. If args is empty,
# don't even try to string-format
print
msg
if
args
:
msg
=
msg
%
args
if
level
in
(
WARN
,
ERROR
,
FATAL
):
stream
=
sys
.
stderr
else
:
print
msg
%
args
sys
.
stdout
.
flush
()
stream
=
sys
.
stdout
stream
.
write
(
'%s
\
n
'
%
msg
)
stream
.
flush
()
def
log
(
self
,
level
,
msg
,
*
args
):
self
.
_log
(
level
,
msg
,
args
)
...
...
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