MCPcopy Create free account
hub / github.com/dbcli/mssql-cli / _remove_root_paths

Function _remove_root_paths

mssqlcli/telemetry.py:238–243  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

236 return head
237
238 def _remove_root_paths(s):
239 site_package_regex = re.compile('.*\\\\site-packages\\\\')
240
241 root = _get_root_path()
242 frames = [p.replace(root, '') for p in s]
243 return str([site_package_regex.sub('site-packages\\\\', f) for f in frames])
244
245 _, _, ex_traceback = sys.exc_info()
246 trace = traceback.format_tb(ex_traceback)

Callers 1

_get_stack_traceFunction · 0.85

Calls 1

_get_root_pathFunction · 0.85

Tested by

no test coverage detected