Skip to content

Commit

Permalink
Fix wrong examples in docstring of xmlrpc (#369)
Browse files Browse the repository at this point in the history
Copy-and-paste typos

Signed-off-by: Eric Brown <[email protected]>
  • Loading branch information
ericwb authored Mar 18, 2024
1 parent bbf09e9 commit f96a1d3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions precli/rules/python/stdlib/xmlrpc_server_unrestricted_bind.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
## Example
```python
from http.server import BaseHTTPRequestHandler
from http.server import HTTPServer
from xmlrpc.server import DocXMLRPCRequestHandler
from xmlrpc.server import DocXMLRPCServer
def run(server_class: HTTPServer, handler_class: BaseHTTPRequestHandler):
server_address = ("", 8000)
def run(server_class: DocXMLRPCServer, handler_class: DocXMLRPCRequestHandler):
server_address = ("::", 8000)
httpd = server_class(server_address, handler_class)
httpd.serve_forever()
```
Expand All @@ -38,11 +38,11 @@ def run(server_class: HTTPServer, handler_class: BaseHTTPRequestHandler):
practice ensures that services are not exposed more broadly than intended.
```python
from http.server import BaseHTTPRequestHandler
from http.server import HTTPServer
from xmlrpc.server import DocXMLRPCRequestHandler
from xmlrpc.server import DocXMLRPCServer
def run(server_class: HTTPServer, handler_class: BaseHTTPRequestHandler):
def run(server_class: DocXMLRPCServer, handler_class: DocXMLRPCRequestHandler):
server_address = ("127.0.0.1", 8000)
httpd = server_class(server_address, handler_class)
httpd.serve_forever()
Expand Down

0 comments on commit f96a1d3

Please sign in to comment.