diff options
author | Filipp Lepalaan <filipp@mac.com> | 2021-05-12 15:36:52 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2021-05-12 15:36:52 +0300 |
commit | 1d20ef4253474c316485ee051c3b61d504c3e174 (patch) | |
tree | c79262a80223994ef321c419b9fab4f197d7a2b4 /servo | |
parent | 5295e88be1a5d3ac1aa94ae267d839e58cc92c5d (diff) | |
download | Servo-1d20ef4253474c316485ee051c3b61d504c3e174.tar.gz Servo-1d20ef4253474c316485ee051c3b61d504c3e174.tar.bz2 Servo-1d20ef4253474c316485ee051c3b61d504c3e174.zip |
python 3 fix
Diffstat (limited to 'servo')
-rw-r--r-- | servo/forms/admin.py | 2 | ||||
-rw-r--r-- | servo/views/gsx.py | 4 | ||||
-rw-r--r-- | servo/views/note.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/servo/forms/admin.py b/servo/forms/admin.py index d0c284a..21fd988 100644 --- a/servo/forms/admin.py +++ b/servo/forms/admin.py @@ -261,7 +261,7 @@ class TemplateForm(BaseModelForm): content = self.cleaned_data.get('content') try: template.Template(content) - except template.TemplateSyntaxError, e: + except template.TemplateSyntaxError as e: raise forms.ValidationError(_('Syntax error in template: %s') % e) return content diff --git a/servo/views/gsx.py b/servo/views/gsx.py index 2f0f057..52909fa 100644 --- a/servo/views/gsx.py +++ b/servo/views/gsx.py @@ -95,7 +95,7 @@ def add_part(request, repair, part): data = {'part': part.part_number, 'repair': rep.confirmation} msg = _("Part %(part)s added to repair %(repair)s") % data messages.success(request, msg) - except gsxws.GsxError, e: + except gsxws.GsxError as e: messages.error(request, e) return redirect(rep.order) @@ -124,7 +124,7 @@ def remove_part(request, repair, part): data = {'part': part.code, 'repair': rep.confirmation} msg = _(u"Part %(part)s removed from %(repair)s") % data messages.success(request, msg) - except gsxws.GsxError, e: + except gsxws.GsxError as e: messages.error(request, e) return redirect(rep.order) diff --git a/servo/views/note.py b/servo/views/note.py index 9672a84..782ef4e 100644 --- a/servo/views/note.py +++ b/servo/views/note.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import json -import StringIO +from io import StringIO from gsxws import escalations from django import template |