Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/adblockplus/files/mimeo.py

Issue 29586667: Make mimeo module only listen to localhost (Closed)
Patch Set: Fixing typo Created Oct. 23, 2017, 3:54 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/adblockplus/files/mimeo.py
===================================================================
--- a/modules/adblockplus/files/mimeo.py
+++ b/modules/adblockplus/files/mimeo.py
@@ -72,6 +72,10 @@
type=str, nargs='?',
default=DEFAULT_LOG,
help='Format of the log ouput')
+ parser.add_argument('--address', action='store',
+ type=str, nargs='?',
+ default='127.0.0.1',
+ help='Address to listen on [default: 127.0.0.1]')
parser.add_argument('output', action='store',
type=str, nargs='?', default='-',
help='The file where the logs will be written')
@@ -84,7 +88,7 @@
Handler.output = fh
Handler.format = args.format
Handler.response = args.response
- server_address = ('', args.port)
+ server_address = (args.address, args.port)
httpd = HTTPServer(server_address, Handler)
httpd.serve_forever()
finally:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld