Skip to content

Commit

Permalink
Scan the right sockdir for Unix Domain sockets
Browse files Browse the repository at this point in the history
  • Loading branch information
joerivanruth committed Jun 10, 2024
1 parent 5cd7315 commit a4cabfb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pymonetdb/mapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,10 @@ def scan_sockdir(self): # noqa C901
my_socks = []
strange_socks = []
prefix = self.target.sockprefix
sockdir = self.target.connect_sockdir
try:
logger.debug(f"scanning {self.target.sockdir!r} for Unix domain sockets")
entries = [e for e in os.scandir(self.target.sockdir) if e.name.startswith(prefix)]
logger.debug(f"scanning {sockdir!r} for Unix domain sockets")
entries = [e for e in os.scandir(sockdir) if e.name.startswith(prefix)]
except OSError:
entries = []
for entry in entries:
Expand Down

0 comments on commit a4cabfb

Please sign in to comment.