MCPcopy
hub / github.com/cool-RR/PySnooper / is_socket

Method is_socket

tests/mini_toolbox/pathlib.py:1637–1648  ·  view source on GitHub ↗

Whether this path is a socket.

(self)

Source from the content-addressed store, hash-verified

1635 return False
1636
1637 def is_socket(self):
1638 """
1639 Whether this path is a socket.
1640 """
1641 try:
1642 return S_ISSOCK(self.stat().st_mode)
1643 except OSError as e:
1644 if e.errno not in (ENOENT, ENOTDIR):
1645 raise
1646 # Path doesn't exist or is a broken symlink
1647 # (see https://bitbucket.org/pitrou/pathlib/issue/12/)
1648 return False
1649
1650 def expanduser(self):
1651 """ Return a new path with expanded ~ and ~user constructs

Callers

nothing calls this directly

Calls 1

statMethod · 0.95

Tested by

no test coverage detected