Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caucase
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
Łukasz Nowak
caucase
Commits
40bd5a05
Commit
40bd5a05
authored
Oct 19, 2018
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http: Use print for stderr too.
Avoids hardcoding newline char.
parent
78162dee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
caucase/http.py
caucase/http.py
+8
-6
No files found.
caucase/http.py
View file @
40bd5a05
...
...
@@ -181,13 +181,14 @@ class CaucaseSSLWSGIRequestHandler(CaucaseWSGIRequestHandler):
def
log_message
(
self
,
format
,
*
args
):
# Note: compared to BaseHTTPHandler, logs the client certificate serial as
# user name.
sys
.
stderr
.
write
(
"%s - %s [%s] %s
\
n
"
%
(
print
(
"%s - %s [%s] %s"
%
(
self
.
client_address
[
0
],
self
.
ssl_client_cert_serial
,
self
.
log_date_time_string
(),
format
%
args
,
)
),
file
=
sys
.
stderr
,
)
# pylint: enable=redefined-builtin
...
...
@@ -662,12 +663,13 @@ def main(argv=None, until=utils.until):
if
host
in
known_host_set
:
continue
known_host_set
.
add
(
host
)
sys
.
stderr
.
write
(
'Listening on [%s]:%i-%i
\
n
'
%
(
print
(
'Listening on [%s]:%i-%i'
%
(
host
,
http_port
,
https_port
,
),
file
=
sys
.
stderr
,
)
http_list
.
append
(
make_server
(
...
...
@@ -780,7 +782,7 @@ def main(argv=None, until=utils.until):
except
utils
.
SleepInterrupt
:
pass
finally
:
sys
.
stderr
.
write
(
'Exiting
\
n
'
)
print
(
'Exiting'
,
file
=
sys
.
stderr
)
for
server
in
itertools
.
chain
(
http_list
,
https_list
):
server
.
server_close
()
server
.
shutdown
()
...
...
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