MCPcopy Index your code
hub / github.com/sshuttle/sshuttle / which

Function which

sshuttle/helpers.py:249–260  ·  view source on GitHub ↗

A wrapper around shutil.which() that searches a predictable set of paths and is more verbose about what is happening. See get_path() for more information.

(file, mode=os.F_OK | os.X_OK)

Source from the content-addressed store, hash-verified

247
248
249def which(file, mode=os.F_OK | os.X_OK):
250 """A wrapper around shutil.which() that searches a predictable set of
251 paths and is more verbose about what is happening. See get_path()
252 for more information.
253 """
254 path = get_path()
255 rv = _which(file, mode, path)
256 if rv:
257 debug2("which() found '%s' at %s" % (file, rv))
258 else:
259 debug2("which() could not find '%s' in %s" % (file, path))
260 return rv
261
262
263def is_admin_user():

Callers 8

__init__Method · 0.90
connectFunction · 0.90
list_routesFunction · 0.90
is_supportedMethod · 0.90
is_supportedMethod · 0.90
is_supportedMethod · 0.90
is_supportedMethod · 0.90
is_supportedMethod · 0.90

Calls 3

get_pathFunction · 0.85
_whichFunction · 0.85
debug2Function · 0.85

Tested by

no test coverage detected