Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
proto3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
protokollsystem
proto3
Commits
dbdc4399
Commit
dbdc4399
authored
7 years ago
by
Robin Sonnabend
Browse files
Options
Downloads
Patches
Plain Diff
Catch JSONDecodeError in wiki.py
Fix
#193
parent
5f051d53
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
wiki.py
+5
-1
5 additions, 1 deletion
wiki.py
with
5 additions
and
1 deletion
wiki.py
+
5
−
1
View file @
dbdc4399
import
requests
from
json
import
JSONDecodeError
import
config
...
...
@@ -117,7 +118,10 @@ class WikiClient:
"
HTTP status code {} on action {}.
"
.
format
(
req
.
status_code
,
action
))
self
.
cookies
.
update
(
req
.
cookies
)
try
:
return
req
.
json
()
except
JSONDecodeError
:
raise
WikiException
(
"
Server did not return valid JSON.
"
)
def
main
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment