Przeglądaj źródła

Remove print_function, change uses of it that were errors to stderr

Conflicts:
	supervisor/compat.py
	supervisor/http_client.py
	supervisor/medusa/auth_handler.py
	supervisor/options.py
	supervisor/tests/test_http_client.py
Mike Naberezny 10 lat temu
rodzic
commit
9751b22629
2 zmienionych plików z 4 dodań i 3 usunięć
  1. 1 1
      supervisor/http_client.py
  2. 3 2
      supervisor/medusa/auth_handler.py

+ 1 - 1
supervisor/http_client.py

@@ -17,7 +17,7 @@ class Listener(object):
         pass
 
     def error(self, url, error):
-        print url, error
+        sys.stderr.write("%s %s\n" % (url, error))
 
     def response_header(self, url, name, value):
         pass

+ 3 - 2
supervisor/medusa/auth_handler.py

@@ -16,6 +16,7 @@ except ImportError:
     from md5 import new as md5
 import re
 import string
+import sys
 import time
 import counter
 
@@ -54,7 +55,7 @@ class auth_handler:
                 try:
                     decoded = base64.decodestring (cookie)
                 except:
-                    print 'malformed authorization info <%s>' % cookie
+                    sys.stderr.write('malformed authorization info <%s>\n' % cookie)
                     request.error (400)
                     return
                 auth_info = decoded.split(':', 1)
@@ -67,7 +68,7 @@ class auth_handler:
             #elif scheme == 'digest':
             #       print 'digest: ',AUTHORIZATION.group(2)
             else:
-                print 'unknown/unsupported auth method: %s' % scheme
+                sys.stderr.write('unknown/unsupported auth method: %s\n' % scheme)
                 self.handle_unauthorized(request)
         else:
             # list both?  prefer one or the other?