Skip to content

Commit b5a0ab8

Browse files
committed
Fix some Http404() to Http404 which seems to be the preferred style in Python
- Legacy-Id: 8528
1 parent bd07ac2 commit b5a0ab8

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

ietf/doc/views_ballot.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def edit_position(request, name, ballot_id):
115115
if has_role(request.user, "Secretariat"):
116116
ad_id = request.GET.get('ad')
117117
if not ad_id:
118-
raise Http404()
118+
raise Http404
119119
ad = get_object_or_404(Person, pk=ad_id)
120120

121121
old_pos = doc.latest_event(BallotPositionDocEvent, type="changed_ballot_position", ad=ad, ballot=ballot)
@@ -250,12 +250,12 @@ def send_ballot_comment(request, name, ballot_id):
250250
if not has_role(request.user, "Area Director"):
251251
ad_id = request.GET.get('ad')
252252
if not ad_id:
253-
raise Http404()
253+
raise Http404
254254
ad = get_object_or_404(Person, pk=ad_id)
255255

256256
pos = doc.latest_event(BallotPositionDocEvent, type="changed_ballot_position", ad=ad, ballot=ballot)
257257
if not pos:
258-
raise Http404()
258+
raise Http404
259259

260260
subj = []
261261
d = ""
@@ -329,11 +329,11 @@ def defer_ballot(request, name):
329329
"""Signal post-pone of ballot, notifying relevant parties."""
330330
doc = get_object_or_404(Document, docalias__name=name)
331331
if doc.type_id not in ('draft','conflrev','statchg'):
332-
raise Http404()
332+
raise Http404
333333
interesting_state = dict(draft='draft-iesg',conflrev='conflrev',statchg='statchg')
334334
state = doc.get_state(interesting_state[doc.type_id])
335335
if not state or state.slug=='defer' or not doc.telechat_date():
336-
raise Http404()
336+
raise Http404
337337

338338
login = request.user.person
339339
telechat_date = TelechatDate.objects.active().order_by("date")[1].date
@@ -378,13 +378,13 @@ def undefer_ballot(request, name):
378378
"""undo deferral of ballot ballot."""
379379
doc = get_object_or_404(Document, docalias__name=name)
380380
if doc.type_id not in ('draft','conflrev','statchg'):
381-
raise Http404()
381+
raise Http404
382382
if doc.type_id == 'draft' and not doc.get_state("draft-iesg"):
383-
raise Http404()
383+
raise Http404
384384
interesting_state = dict(draft='draft-iesg',conflrev='conflrev',statchg='statchg')
385385
state = doc.get_state(interesting_state[doc.type_id])
386386
if not state or state.slug!='defer':
387-
raise Http404()
387+
raise Http404
388388

389389
telechat_date = TelechatDate.objects.active().order_by("date")[0].date
390390

@@ -415,7 +415,7 @@ def lastcalltext(request, name):
415415
"""Editing of the last call text"""
416416
doc = get_object_or_404(Document, docalias__name=name)
417417
if not doc.get_state("draft-iesg"):
418-
raise Http404()
418+
raise Http404
419419

420420
login = request.user.person
421421

@@ -578,7 +578,7 @@ def ballot_approvaltext(request, name):
578578
"""Editing of approval text"""
579579
doc = get_object_or_404(Document, docalias__name=name)
580580
if not doc.get_state("draft-iesg"):
581-
raise Http404()
581+
raise Http404
582582

583583
login = request.user.person
584584

@@ -626,7 +626,7 @@ def approve_ballot(request, name):
626626
"""Approve ballot, sending out announcement, changing state."""
627627
doc = get_object_or_404(Document, docalias__name=name)
628628
if not doc.get_state("draft-iesg"):
629-
raise Http404()
629+
raise Http404
630630

631631
login = request.user.person
632632

0 commit comments

Comments
 (0)