mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Move the prefix assignment out of the try block for socket creation
This commit is contained in:
parent
51bd154c99
commit
cb92b5bba7
@ -25,9 +25,9 @@ class Statsd(Logger):
|
||||
"""host, port: statsD server
|
||||
"""
|
||||
Logger.__init__(self, cfg)
|
||||
self.prefix = cfg.statsd_prefix
|
||||
try:
|
||||
host, port = cfg.statsd_host
|
||||
self.prefix = cfg.statsd_prefix
|
||||
self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
self.sock.connect((host, int(port)))
|
||||
except Exception:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user