@@ -25,7 +25,7 @@ def __init__(self, host='127.0.0.1', port=0, application=None, **kwargs):
25
25
self ._server = make_server (host , port , self .app , ** kwargs )
26
26
self .server_address = self ._server .server_address
27
27
28
- super (WSGIServer , self ).__init__ (
28
+ super ().__init__ (
29
29
name = self .__class__ ,
30
30
target = self ._server .serve_forever )
31
31
@@ -54,7 +54,7 @@ def __bool__(self):
54
54
def _encode_chunk (chunk , charset ):
55
55
if isinstance (chunk , str ):
56
56
chunk = chunk .encode (charset )
57
- return '{0 :x}' .format (len (chunk )).encode (charset ) + b'\r \n ' + chunk + b'\r \n '
57
+ return '{:x}' .format (len (chunk )).encode (charset ) + b'\r \n ' + chunk + b'\r \n '
58
58
59
59
60
60
class ContentServer (WSGIServer ):
@@ -79,7 +79,7 @@ class ContentServer(WSGIServer):
79
79
"""
80
80
81
81
def __init__ (self , host = '127.0.0.1' , port = 0 , ssl_context = None ):
82
- super (ContentServer , self ).__init__ (host , port , self , ssl_context = ssl_context )
82
+ super ().__init__ (host , port , self , ssl_context = ssl_context )
83
83
self .content , self .code = ('' , 204 ) # HTTP 204: No Content
84
84
self .headers = {}
85
85
self .show_post_vars = False
0 commit comments