Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apachedex
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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastien Robin
apachedex
Commits
fcdcc68b
Commit
fcdcc68b
authored
Apr 14, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't provide encoding parameter to json.dump & json.load.
parent
cad26bac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
apachedex/__init__.py
apachedex/__init__.py
+2
-3
No files found.
apachedex/__init__.py
View file @
fcdcc68b
...
...
@@ -1081,8 +1081,7 @@ def asHTML(out, encoding, per_site, args, default_site, period_parameter_dict,
out
.
write
(
'</body></html>'
)
def
asJSON
(
out
,
encoding
,
per_site
,
*
_
):
json
.
dump
([(
x
,
y
.
asJSONState
())
for
x
,
y
in
per_site
.
iteritems
()],
out
,
encoding
=
'ascii'
)
json
.
dump
([(
x
,
y
.
asJSONState
())
for
x
,
y
in
per_site
.
iteritems
()],
out
)
format_generator
=
{
'html'
:
(
asHTML
,
'utf-8'
),
...
...
@@ -1257,7 +1256,7 @@ def main():
state_file
=
open
(
state_file_name
)
with
state_file
:
load_start
=
time
.
time
()
state
=
json
.
load
(
state_file
,
encoding
=
'ascii'
)
state
=
json
.
load
(
state_file
)
for
url
,
site_state
in
state
:
if
url
is
None
:
site
=
None
...
...
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