Skip to content

Commit eba4793

Browse files
committed
Removed dead code about listening port.
1 parent 7767576 commit eba4793

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

config.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def get_parsed_args():
2828
return options, args
2929

3030
def get_version():
31-
return "3.0.3"
31+
return "3.0.4"
3232

3333
def skip_leading_wsp(f):
3434
"Works on a file, returns a file-like object"
@@ -94,7 +94,7 @@ def get_config(parse_args = True, cfg_path=None, init_logging=False):
9494
if options is not None and options.use_forwarder:
9595
listen_port = 17123
9696
if config.has_option('Main','listen_port'):
97-
listen_port = config.get('Main','listen_port')
97+
listen_port = config.get('Main', 'listen_port')
9898
agentConfig['ddUrl'] = "http://localhost:" + str(listen_port)
9999
elif options is not None and options.dd_url:
100100
agentConfig['ddUrl'] = options.dd_url
@@ -138,12 +138,6 @@ def get_config(parse_args = True, cfg_path=None, init_logging=False):
138138
if config.get('Main', 'watchdog').lower() in ('no', 'false'):
139139
agentConfig['watchdog'] = False
140140

141-
# port we listen on (overriden via command line)
142-
if config.has_option('Main','port'):
143-
agentConfig['listen_port'] = int(config.get('Main','port'))
144-
else:
145-
agentConfig['listen_port'] = None
146-
147141
# Optional graphite listener
148142
if config.has_option('Main','graphite_listen_port'):
149143
agentConfig['graphite_listen_port'] = int(config.get('Main','graphite_listen_port'))

tests/test_datadog.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ def test_supervisord_parser(self):
341341
2012-07-14 04:54:34,193 WARN received SIGTERM indicating exit request
342342
"""
343343
event_type = supervisord_log.EVENT_TYPE
344-
event_object = EventDefaults.EVENT_OBJECT
345344

346345
expected_output = {
347346
"dogstreamEvents":[

0 commit comments

Comments
 (0)