Skip to content

Commit 8c3c5b9

Browse files
committed
change to using path rather than filename for unix sockets
1 parent bd7a28d commit 8c3c5b9

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

clamd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,15 +274,15 @@ class ClamdUnixSocket(ClamdNetworkSocket):
274274
"""
275275
Class for using clamd with an unix socket
276276
"""
277-
def __init__(self, filename="/var/run/clamav/clamd.ctl", timeout=None):
277+
def __init__(self, path="/var/run/clamav/clamd.ctl", timeout=None):
278278
"""
279279
class initialisation
280280
281-
filename (string) : unix socket filename
281+
path (string) : unix socket path
282282
timeout (float or None) : socket timeout
283283
"""
284284

285-
self.unix_socket = filename
285+
self.unix_socket = path
286286
self.timeout = timeout
287287

288288
def _init_socket(self):

tests/test_api.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@ def __init__(self):
9191

9292
@raises(clamd.ConnectionError)
9393
def test_cannot_connect():
94-
clamd.ClamdUnixSocket(filename="/tmp/404").ping()
95-
96-
94+
clamd.ClamdUnixSocket(path="/tmp/404").ping()
9795

9896

9997
# class TestNetworkSocket(TestUnixSocket):

0 commit comments

Comments
 (0)