changeset 8238:27c4ad3e584f

cleanup: trivial fixes for some pyflakes warnings
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 09 Feb 2020 19:42:16 +0100
parents 34a59bfcebb1
children 9d6cc55384fe
files kallithea/controllers/changeset.py kallithea/lib/vcs/utils/imports.py setup.py
diffstat 3 files changed, 4 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/changeset.py	Tue Feb 11 03:54:43 2020 +0100
+++ b/kallithea/controllers/changeset.py	Sun Feb 09 19:42:16 2020 +0100
@@ -33,7 +33,7 @@
 from tg import request, response
 from tg import tmpl_context as c
 from tg.i18n import ugettext as _
-from webob.exc import HTTPBadRequest, HTTPForbidden, HTTPFound, HTTPNotFound
+from webob.exc import HTTPBadRequest, HTTPForbidden, HTTPNotFound
 
 import kallithea.lib.helpers as h
 from kallithea.lib import diffs
--- a/kallithea/lib/vcs/utils/imports.py	Tue Feb 11 03:54:43 2020 +0100
+++ b/kallithea/lib/vcs/utils/imports.py	Sun Feb 09 19:42:16 2020 +0100
@@ -1,6 +1,3 @@
-from kallithea.lib.vcs.exceptions import VCSError
-
-
 def import_class(class_path):
     """
     Returns class from the given path.
@@ -8,10 +5,7 @@
     For example, in order to get class located at
     ``vcs.backends.hg.MercurialRepository``:
 
-        try:
-            hgrepo = import_class('vcs.backends.hg.MercurialRepository')
-        except VCSError:
-            # handle error
+        hgrepo = import_class('vcs.backends.hg.MercurialRepository')
     """
     splitted = class_path.split('.')
     mod_path = '.'.join(splitted[:-1])
--- a/setup.py	Tue Feb 11 03:54:43 2020 +0100
+++ b/setup.py	Sun Feb 09 19:42:16 2020 +0100
@@ -112,8 +112,8 @@
     long_description = open(README_FILE).read()
 except IOError as err:
     sys.stderr.write(
-        "[WARNING] Cannot find file specified as long_description (%s)\n"
-        % README_FILE
+        "[WARNING] Cannot find file specified as long_description (%s): %s\n"
+        % (README_FILE, err)
     )
     long_description = description