[damned-lies] Avoid undefined variable access
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Avoid undefined variable access
- Date: Thu, 10 Jun 2021 09:18:13 +0000 (UTC)
commit 28423d364b26eea200f9112989347c4c3ce2955a
Author: Claude Paroz <claude 2xlibre net>
Date: Thu Jun 10 11:18:01 2021 +0200
Avoid undefined variable access
vertimus/views.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/vertimus/views.py b/vertimus/views.py
index 0ca3f99e..83c169bb 100644
--- a/vertimus/views.py
+++ b/vertimus/views.py
@@ -300,12 +300,13 @@ class QualityCheckView(PoFileActionBase):
results = check_po_quality(self.pofile, context['checks'])
except OSError as err:
context['results'] = 'Sorry, the server was not able to run the quality checks on this file
(%s)' % err
- if results:
- context['results'] = mark_safe(re.sub(
- r'^(# \(pofilter\) .*)', r'<span class="highlight">\1</span>', escape(results),
flags=re.M
- ))
else:
- context['results'] = _('The po file looks good!')
+ if results:
+ context['results'] = mark_safe(re.sub(
+ r'^(# \(pofilter\) .*)', r'<span class="highlight">\1</span>', escape(results),
flags=re.M
+ ))
+ else:
+ context['results'] = _('The po file looks good!')
return context
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]