diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2015-06-25 10:33:35 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2015-06-25 10:33:35 +1200 |
commit | 94a7770a9404cf0da3a0bab5064976ba26e9762f (patch) | |
tree | a56c0eecb699962f55a96186b95a181775aaafce /libpathod/pathoc.py | |
parent | 0e15b9436890a60c8657b1d5df41f3bf1c4f9eb8 (diff) | |
download | mitmproxy-94a7770a9404cf0da3a0bab5064976ba26e9762f.tar.gz mitmproxy-94a7770a9404cf0da3a0bab5064976ba26e9762f.tar.bz2 mitmproxy-94a7770a9404cf0da3a0bab5064976ba26e9762f.zip |
Output warning info to log fp using logging methods
Diffstat (limited to 'libpathod/pathoc.py')
-rw-r--r-- | libpathod/pathoc.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libpathod/pathoc.py b/libpathod/pathoc.py index a32e13b5..af43defc 100644 --- a/libpathod/pathoc.py +++ b/libpathod/pathoc.py @@ -218,8 +218,12 @@ class Pathoc(tcp.TCPClient): if self.use_http2: if not OpenSSL._util.lib.Cryptography_HAS_ALPN: # pragma: nocover - print >> sys.stderr, "HTTP/2 requires ALPN support. Please use OpenSSL >= 1.0.2." - print >> sys.stderr, "Pathoc might not be working as expected without ALPN." + log.write( + self.fp, + "HTTP/2 requires ALPN support. " + "Please use OpenSSL >= 1.0.2. " + "Pathoc might not be working as expected without ALPN." + ) self.protocol = http2.HTTP2Protocol(self) else: # TODO: create HTTP or Websockets protocol |