FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeql/python/extractor/buildtools/helper.py at codeql-cli/v2.26.0 · github/codeql · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
github
/
codeql
Public
Notifications
You must be signed in to change notification settings
Fork
2.1k
Star
10k
Code
Issues
998
Pull requests
464
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
codeql
/
python
/
extractor
/
buildtools
/
helper.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
16 lines (12 loc) · 578 Bytes
Breadcrumbs
codeql
/
python
/
extractor
/
buildtools
/
helper.py
Copy path
File metadata and controls
16 lines (12 loc) · 578 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import
os
import
traceback
import
re
SCRIPTDIR
=
os
.
path
.
split
(
os
.
path
.
dirname
(
__file__
))[
1
]
def
print_exception_indented
(
opt
=
None
):
exc_text
=
traceback
.
format_exc
()
for
line
in
exc_text
.
splitlines
():
# remove path information that might be sensitive
# for example, in the .pyc files for Python 2, a traceback would contain
# /home/rasmus/code/target/thirdparty/python/build/extractor-python/buildtools/install.py
line
=
re
.
sub
(
r'File \".*'
+
SCRIPTDIR
+
r'(.*)\",'
,
r'File <'
+
SCRIPTDIR
+
r'\1>'
,
line
)
print
(
' '
+
line
)
Back
|
FazBrowse Home
|
New Git URL