Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.toolbox
Commits
83f19225
Commit
83f19225
authored
Feb 08, 2019
by
Bryton Lacquement
🚪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! Use BytesIO and StringIO from io instead of six
parent
42f3fb16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
slapos/promise/check_web_page_http_cache_hit/__init__.py
slapos/promise/check_web_page_http_cache_hit/__init__.py
+3
-3
No files found.
slapos/promise/check_web_page_http_cache_hit/__init__.py
View file @
83f19225
...
...
@@ -13,7 +13,7 @@ import re
import
pycurl
from
email.message
import
Message
from
io
import
String
IO
from
io
import
Bytes
IO
from
six.moves
import
html_parser
as
HTMLParser
begins_by_known_protocol_re
=
re
.
compile
(
"^https?://"
)
...
...
@@ -63,8 +63,8 @@ def checkWebpageHttpCacheHit(url_list, resolve_list=[], cookie_jar_path=None):
parsed_url_dict
.
add
(
url
)
print
(
"Checking cache hit for "
+
url
)
c
=
pycurl
.
Curl
()
response_headers
=
String
IO
()
output
=
String
IO
()
response_headers
=
Bytes
IO
()
output
=
Bytes
IO
()
c
.
setopt
(
c
.
URL
,
url
)
c
.
setopt
(
c
.
RESOLVE
,
resolve_list
)
c
.
setopt
(
c
.
WRITEFUNCTION
,
output
.
write
)
...
...
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