changeset 6254:0c67924f293b

helpers: remove unused get_error / _GetError This method/class was introduced in the very first commit of this repository, but is no longer used.
author Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
date Sat, 08 Oct 2016 21:30:38 +0200
parents 48f8c73a94f2
children e3ddcc3538df
files kallithea/lib/helpers.py
diffstat 1 files changed, 0 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/helpers.py	Sat Oct 08 20:22:26 2016 +0200
+++ b/kallithea/lib/helpers.py	Sat Oct 08 21:30:38 2016 +0200
@@ -135,22 +135,6 @@
     return 'C-%s-%s' % (short_id(raw_id), hashlib.md5(safe_str(path)).hexdigest()[:12])
 
 
-class _GetError(object):
-    """Get error from form_errors, and represent it as span wrapped error
-    message
-
-    :param field_name: field to fetch errors for
-    :param form_errors: form errors dict
-    """
-
-    def __call__(self, field_name, form_errors):
-        tmpl = """<span class="error_msg">%s</span>"""
-        if form_errors and field_name in form_errors:
-            return literal(tmpl % form_errors.get(field_name))
-
-get_error = _GetError()
-
-
 class _FilesBreadCrumbs(object):
 
     def __call__(self, repo_name, rev, paths):