Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tiago Peixoto
graph-tool
Commits
f97b2dbd
Commit
f97b2dbd
authored
Dec 10, 2020
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netzschleuder.py: simplify token
parent
bfd0999e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
src/graph_tool/collection/netzschleuder.py
src/graph_tool/collection/netzschleuder.py
+1
-3
No files found.
src/graph_tool/collection/netzschleuder.py
View file @
f97b2dbd
...
...
@@ -45,9 +45,7 @@ def open_ns_file(url, token=None):
if
token
is
None
:
req
=
urllib
.
request
.
Request
(
url
)
else
:
req
=
urllib
.
request
.
Request
(
url
,
headers
=
{
"WWW-Authenticate"
:
f
"Authorization: Bearer
{
token
}
"
})
req
=
urllib
.
request
.
Request
(
url
,
headers
=
{
"WWW-Authenticate"
:
token
})
with
urllib
.
request
.
urlopen
(
req
)
as
f
:
yield
f
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment