diff options
author | Magnus Hagander | 2019-02-06 18:40:45 +0000 |
---|---|---|
committer | Magnus Hagander | 2019-02-06 19:01:49 +0000 |
commit | b88715934631422b20c56affcb679b901c702a0c (patch) | |
tree | 16b39cee57eab9f55ff26c0d0413029728c11b93 /pgcommitfest/commitfest/views.py | |
parent | 463b3c1fe2e5bea061269ed9eea4b876a9eab213 (diff) |
Fix imports and exceptions for Python3
Diffstat (limited to 'pgcommitfest/commitfest/views.py')
-rw-r--r-- | pgcommitfest/commitfest/views.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pgcommitfest/commitfest/views.py b/pgcommitfest/commitfest/views.py index 7835f5e..d8abd55 100644 --- a/pgcommitfest/commitfest/views.py +++ b/pgcommitfest/commitfest/views.py @@ -19,12 +19,12 @@ import json from pgcommitfest.mailqueue.util import send_mail, send_simple_mail from pgcommitfest.userprofile.util import UserWrapper -from models import CommitFest, Patch, PatchOnCommitFest, PatchHistory, Committer -from models import MailThread -from forms import PatchForm, NewPatchForm, CommentForm, CommitFestFilterForm -from forms import BulkEmailForm -from ajax import doAttachThread, refresh_single_thread -from feeds import ActivityFeed +from .models import CommitFest, Patch, PatchOnCommitFest, PatchHistory, Committer +from .models import MailThread +from .forms import PatchForm, NewPatchForm, CommentForm, CommitFestFilterForm +from .forms import BulkEmailForm +from .ajax import doAttachThread, refresh_single_thread +from .feeds import ActivityFeed def home(request): @@ -397,7 +397,7 @@ def comment(request, cfid, patchid, what): if request.method == 'POST': try: form = CommentForm(patch, poc, is_review, data=request.POST) - except Exception, e: + except Exception as e: messages.add_message(request, messages.ERROR, "Failed to build list of response options from the archives: %s" % e) return HttpResponseRedirect('/%s/%s/' % (cf.id, patch.id)) @@ -457,7 +457,7 @@ def comment(request, cfid, patchid, what): else: try: form = CommentForm(patch, poc, is_review) - except Exception, e: + except Exception as e: messages.add_message(request, messages.ERROR, "Failed to build list of response options from the archives: %s" % e) return HttpResponseRedirect('/%s/%s/' % (cf.id, patch.id)) @@ -742,7 +742,7 @@ def thread_notify(request): try: t = MailThread.objects.get(messageid=m) refresh_single_thread(t) - except Exception, e: + except Exception as e: # Just ignore it, we'll check again later pass |