Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
J
jenkins.debian.net
Manage
Activity
Members
Labels
Code
Merge requests
11
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
Debian QA
jenkins.debian.net
Commits
e9931086
Verified
Commit
e9931086
authored
6 years ago
by
Mattia Rizzolo
Browse files
Options
Downloads
Patches
Plain Diff
reproducible: web scheduler: print debug info also in case of ValidationError
Signed-off-by:
Mattia Rizzolo
<
mattia@debian.org
>
parent
9034bf1e
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/cgi-bin/schedule
+11
-6
11 additions, 6 deletions
bin/cgi-bin/schedule
with
11 additions
and
6 deletions
bin/cgi-bin/schedule
+
11
−
6
View file @
e9931086
...
...
@@ -12,13 +12,22 @@ import subprocess
cgitb
.
enable
()
def
debug_info
():
# Debug info, to be removed once ready to go.
print
()
print
(
'
WARNING: This endpoint is still a WORK IN PROGRESS. This means that the option details can change, and it will not commit any change.
'
)
print
(
'
You are aunthenticated as: {}
'
.
format
(
user
))
print
(
cgi
.
FieldStorage
())
class
ValidationError
(
Exception
):
def
__init__
(
self
,
message
):
super
().
__init__
(
message
)
print
(
'
Status: 400 Bad Request
'
)
print
(
'
Content-Type: text/
html
; charset=
"
utf-8
"'
)
print
(
'
Content-Type: text/
plain
; charset=
"
utf-8
"'
)
print
()
print
(
message
)
debug_info
()
sys
.
exit
()
...
...
@@ -131,8 +140,4 @@ else:
print
()
cgitb
.
handler
()
# Debug info, to be removed once ready to go.
print
()
print
(
'
WARNING: This endpoint is still a WORK IN PROGRESS. This means that the option details can change, and it will not commit any change.
'
)
print
(
'
You are aunthenticated as: {}
'
.
format
(
user
))
print
(
cgi
.
FieldStorage
())
debug_info
()
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